Make IPProfiles and IPAllocations storable in MySQL and Postgres

This commit is contained in:
arberkatellari
2025-10-31 16:02:34 +02:00
committed by Dan Christian Bogos
parent 1657f015fc
commit 40a8e6ae31
14 changed files with 363 additions and 70 deletions

View 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");