Files
telecom-platform/migrations/00012_init_config_entries.sql
nutcas3 e6450f15ad 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
2026-04-29 03:25:28 +03:00

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;