mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-22 15:48:44 +05:00
Make IPProfiles and IPAllocations storable in MySQL and Postgres
This commit is contained in:
committed by
Dan Christian Bogos
parent
1657f015fc
commit
40a8e6ae31
34
data/storage/postgres/create_db_tables.sql
Normal file
34
data/storage/postgres/create_db_tables.sql
Normal file
@@ -0,0 +1,34 @@
|
||||
--
|
||||
-- Table structure for table `accounts`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS accounts;
|
||||
CREATE TABLE accounts (
|
||||
pk SERIAL PRIMARY KEY,
|
||||
tenant VARCHAR(40) NOT NULL,
|
||||
id VARCHAR(64) NOT NULL,
|
||||
account JSONB NOT NULL,
|
||||
UNIQUE (tenant, id)
|
||||
);
|
||||
CREATE UNIQUE INDEX accounts_idx ON accounts ("id");
|
||||
|
||||
DROP TABLE IF EXISTS ip_profiles;
|
||||
CREATE TABLE ip_profiles (
|
||||
pk SERIAL PRIMARY KEY,
|
||||
tenant VARCHAR(40) NOT NULL,
|
||||
id VARCHAR(64) NOT NULL,
|
||||
ip_profile JSONB NOT NULL,
|
||||
UNIQUE (tenant, id)
|
||||
);
|
||||
CREATE UNIQUE INDEX ip_profiles_idx ON ip_profiles ("id");
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS ip_allocations;
|
||||
CREATE TABLE ip_allocations (
|
||||
pk SERIAL PRIMARY KEY,
|
||||
tenant VARCHAR(40) NOT NULL,
|
||||
id VARCHAR(64) NOT NULL,
|
||||
ip_allocation JSONB NOT NULL,
|
||||
UNIQUE (tenant, id)
|
||||
);
|
||||
CREATE UNIQUE INDEX ip_allocations_idx ON ip_allocations ("id");
|
||||
Reference in New Issue
Block a user