Feat rebrand armature (#43)
All checks were successful
All checks were successful
Co-authored-by: Jeffrey Smith <jasafpro@gmail.com> Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit was merged in pull request #43.
This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
||||
_ "github.com/lib/pq"
|
||||
_ "modernc.org/sqlite"
|
||||
|
||||
"switchboard-core/config"
|
||||
"armature/config"
|
||||
)
|
||||
|
||||
// DB is the application-wide database connection pool.
|
||||
@@ -80,7 +80,7 @@ func connectPostgres(dsn string) error {
|
||||
// connectSQLite opens a SQLite database with WAL mode enabled.
|
||||
func connectSQLite(dsn string) error {
|
||||
if dsn == "" {
|
||||
dsn = "switchboard.db"
|
||||
dsn = "armature.db"
|
||||
}
|
||||
|
||||
// Ensure parent directory exists for file-based DBs.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-- ==========================================
|
||||
-- Switchboard Core — 001 Core
|
||||
-- Armature — 001 Core
|
||||
-- ==========================================
|
||||
-- Users, auth, platform policies, global settings, presence, OIDC.
|
||||
-- ==========================================
|
||||
@@ -89,7 +89,7 @@ CREATE TABLE IF NOT EXISTS global_settings (
|
||||
|
||||
INSERT INTO global_settings (key, value) VALUES
|
||||
('registration', '{"enabled": true}'::jsonb),
|
||||
('site', '{"name": "Switchboard Core", "tagline": "Extension Platform"}'::jsonb),
|
||||
('site', '{"name": "Armature", "tagline": "Extension Platform"}'::jsonb),
|
||||
('banner', '{"enabled": false, "text": "", "bg": "#007a33", "fg": "#ffffff"}'::jsonb)
|
||||
ON CONFLICT (key) DO NOTHING;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-- ==========================================
|
||||
-- Switchboard Core — 002 Teams & Access Control
|
||||
-- Armature — 002 Teams & Access Control
|
||||
-- ==========================================
|
||||
|
||||
CREATE TABLE IF NOT EXISTS teams (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-- ==========================================
|
||||
-- Switchboard Core — 003 Packages & Extensions
|
||||
-- Armature — 003 Packages & Extensions
|
||||
-- ==========================================
|
||||
|
||||
CREATE TABLE IF NOT EXISTS packages (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-- ==========================================
|
||||
-- Switchboard Core — 004 Connections & Dependencies
|
||||
-- Armature — 004 Connections & Dependencies
|
||||
-- ==========================================
|
||||
|
||||
CREATE TABLE IF NOT EXISTS ext_connections (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-- ==========================================
|
||||
-- Switchboard Core — 005 Notifications
|
||||
-- Armature — 005 Notifications
|
||||
-- ==========================================
|
||||
|
||||
CREATE TABLE IF NOT EXISTS notifications (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-- ==========================================
|
||||
-- Switchboard Core — 006 Audit
|
||||
-- Armature — 006 Audit
|
||||
-- ==========================================
|
||||
|
||||
CREATE TABLE IF NOT EXISTS audit_log (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-- ==========================================
|
||||
-- Switchboard Core — 007 Workflows
|
||||
-- Armature — 007 Workflows
|
||||
-- ==========================================
|
||||
-- Workflow definitions, stages, version snapshots.
|
||||
-- v0.3.0: persona_id + history_mode dropped (chat vestiges).
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-- ==========================================
|
||||
-- Switchboard Core — 009 Multi-Replica HA
|
||||
-- Armature — 009 Multi-Replica HA
|
||||
-- ==========================================
|
||||
|
||||
CREATE TABLE IF NOT EXISTS ws_tickets (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-- ==========================================
|
||||
-- Switchboard Core — 011 Triggers & Scheduled Tasks
|
||||
-- Armature — 011 Triggers & Scheduled Tasks
|
||||
-- ==========================================
|
||||
|
||||
-- ── Extension Triggers (event + webhook) ──────
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-- ==========================================
|
||||
-- Switchboard Core — 001 Core (SQLite)
|
||||
-- Armature — 001 Core (SQLite)
|
||||
-- ==========================================
|
||||
|
||||
PRAGMA journal_mode = WAL;
|
||||
@@ -69,7 +69,7 @@ CREATE TABLE IF NOT EXISTS global_settings (
|
||||
|
||||
INSERT OR IGNORE INTO global_settings (key, value) VALUES
|
||||
('registration', '{"enabled": true}'),
|
||||
('site', '{"name": "Switchboard Core", "tagline": "Extension Platform"}'),
|
||||
('site', '{"name": "Armature", "tagline": "Extension Platform"}'),
|
||||
('banner', '{"enabled": false, "text": "", "bg": "#007a33", "fg": "#ffffff"}');
|
||||
|
||||
CREATE TABLE IF NOT EXISTS user_presence (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-- ==========================================
|
||||
-- Switchboard Core — 002 Teams & Access Control (SQLite)
|
||||
-- Armature — 002 Teams & Access Control (SQLite)
|
||||
-- ==========================================
|
||||
|
||||
CREATE TABLE IF NOT EXISTS teams (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-- ==========================================
|
||||
-- Switchboard Core — 003 Packages & Extensions (SQLite)
|
||||
-- Armature — 003 Packages & Extensions (SQLite)
|
||||
-- ==========================================
|
||||
|
||||
CREATE TABLE IF NOT EXISTS packages (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-- ==========================================
|
||||
-- Switchboard Core — 004 Connections & Dependencies (SQLite)
|
||||
-- Armature — 004 Connections & Dependencies (SQLite)
|
||||
-- ==========================================
|
||||
|
||||
CREATE TABLE IF NOT EXISTS ext_connections (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-- ==========================================
|
||||
-- Switchboard Core — 005 Notifications (SQLite)
|
||||
-- Armature — 005 Notifications (SQLite)
|
||||
-- ==========================================
|
||||
|
||||
CREATE TABLE IF NOT EXISTS notifications (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-- ==========================================
|
||||
-- Switchboard Core — 006 Audit (SQLite)
|
||||
-- Armature — 006 Audit (SQLite)
|
||||
-- ==========================================
|
||||
|
||||
CREATE TABLE IF NOT EXISTS audit_log (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-- ==========================================
|
||||
-- Switchboard Core — 007 Workflows (SQLite)
|
||||
-- Armature — 007 Workflows (SQLite)
|
||||
-- ==========================================
|
||||
-- v0.3.0: persona_id + history_mode dropped (chat vestiges).
|
||||
-- transition_rules → stage_config, stage_mode modernized.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-- ==========================================
|
||||
-- Switchboard Core — 009 Multi-Replica HA (SQLite)
|
||||
-- Armature — 009 Multi-Replica HA (SQLite)
|
||||
-- ==========================================
|
||||
|
||||
CREATE TABLE IF NOT EXISTS ws_tickets (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-- ==========================================
|
||||
-- Switchboard Core — 011 Triggers & Scheduled Tasks (SQLite)
|
||||
-- Armature — 011 Triggers & Scheduled Tasks (SQLite)
|
||||
-- ==========================================
|
||||
|
||||
-- ── Extension Triggers (event + webhook) ──────
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
// Use SetupTestDB in TestMain and pass this to subtests.
|
||||
var TestDB *sql.DB
|
||||
|
||||
const testDBName = "switchboard_core_ci"
|
||||
const testDBName = "armature_ci"
|
||||
|
||||
// SetupTestDB connects to the appropriate database backend (Postgres or
|
||||
// SQLite based on DB_DRIVER env), runs migrations, and sets database.DB
|
||||
@@ -50,7 +50,7 @@ func setupSQLiteTestDB() func() {
|
||||
CurrentDialect = DialectSQLite
|
||||
|
||||
// Use a temp file so multiple connections share the same DB.
|
||||
tmpFile, err := os.CreateTemp("", "switchboard-test-*.db")
|
||||
tmpFile, err := os.CreateTemp("", "armature-test-*.db")
|
||||
if err != nil {
|
||||
log.Printf("⚠ Cannot create temp SQLite DB: %v — skipping DB tests", err)
|
||||
return func() {}
|
||||
@@ -337,7 +337,7 @@ func TruncateAll(t *testing.T) {
|
||||
DB.Exec(`
|
||||
INSERT INTO global_settings (key, value) VALUES
|
||||
('registration', '{"enabled": true}'),
|
||||
('site', '{"name": "Switchboard Core", "tagline": "Self-hosted extension platform"}'),
|
||||
('site', '{"name": "Armature", "tagline": "Self-hosted extension platform"}'),
|
||||
('banner', '{"enabled": false, "text": "", "bg": "#007a33", "fg": "#ffffff"}')
|
||||
ON CONFLICT (key) DO NOTHING
|
||||
`)
|
||||
@@ -351,7 +351,7 @@ func TruncateAll(t *testing.T) {
|
||||
DB.Exec(`
|
||||
INSERT INTO global_settings (key, value) VALUES
|
||||
('registration', '{"enabled": true}'::jsonb),
|
||||
('site', '{"name": "Switchboard Core", "tagline": "Self-hosted extension platform"}'::jsonb),
|
||||
('site', '{"name": "Armature", "tagline": "Self-hosted extension platform"}'::jsonb),
|
||||
('banner', '{"enabled": false, "text": "", "bg": "#007a33", "fg": "#ffffff"}'::jsonb)
|
||||
ON CONFLICT (key) DO NOTHING
|
||||
`)
|
||||
|
||||
Reference in New Issue
Block a user