Files
telecom-platform/migrations/00015_init_imsi_allocations.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

15 lines
455 B
SQL

-- +goose Up
-- Create imsi_allocations table
CREATE TABLE IF NOT EXISTS imsi_allocations (
id SERIAL PRIMARY KEY,
last_imsi BIGINT NOT NULL DEFAULT 0,
min_imsi BIGINT NOT NULL DEFAULT 1,
max_imsi BIGINT NOT NULL DEFAULT 999999999,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);
-- +goose Down
-- Drop imsi_allocations table
DROP TABLE IF EXISTS imsi_allocations CASCADE;