mirror of
https://github.com/andwati/telecom-platform.git
synced 2026-10-18 19:12:54 +00:00
- 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
24 lines
719 B
SQL
24 lines
719 B
SQL
-- +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;
|