mirror of
https://github.com/andwati/telecom-platform.git
synced 2026-11-21 19:38:49 +00:00
feat: Add comprehensive database schema migrations for all platform tables
- Add subscribers table with IMSI, MSISDN, authentication keys, and eSIM profile fields - Add service_plans table for data/voice/SMS limits and QoS parameters (ARPA, AMBR) - Add sessions table for tracking PDU sessions with QoS and usage metrics - Add usage_records table for billing and charging data - Add users table with role-based access control fields - Add roles, permissions, and role_permissions junction table for RBAC - Add auth
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
-- +goose Up
|
||||
-- Create config_entries table
|
||||
CREATE TABLE IF NOT EXISTS config_entries (
|
||||
id SERIAL PRIMARY KEY,
|
||||
section TEXT NOT NULL,
|
||||
key TEXT NOT NULL,
|
||||
value TEXT,
|
||||
type TEXT,
|
||||
sensitive BOOLEAN NOT NULL DEFAULT false,
|
||||
description TEXT,
|
||||
updated_by TEXT,
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
||||
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
||||
UNIQUE(section, key)
|
||||
);
|
||||
|
||||
-- Create indexes
|
||||
CREATE INDEX IF NOT EXISTS idx_config_entries_section ON config_entries(section);
|
||||
CREATE INDEX IF NOT EXISTS idx_config_entries_key ON config_entries(key);
|
||||
|
||||
-- +goose Down
|
||||
-- Drop config_entries table
|
||||
DROP TABLE IF EXISTS config_entries CASCADE;
|
||||
Reference in New Issue
Block a user