Modified tables for mysql and postgres in case of accounts

This commit is contained in:
porosnicuadrian
2021-04-09 17:53:44 +03:00
committed by Dan Christian Bogos
parent 60e8c32e95
commit 4d75296f51
2 changed files with 7 additions and 7 deletions

View File

@@ -329,8 +329,8 @@ CREATE TABLE tp_action_profiles (
);
DROP TABLE IF EXISTS tp_account_profiles;
CREATE TABLE tp_account_profiles (
DROP TABLE IF EXISTS tp_accounts;
CREATE TABLE tp_accounts (
`pk` int(11) NOT NULL AUTO_INCREMENT,
`tpid` varchar(64) NOT NULL,
`tenant` varchar(64) NOT NULL,
@@ -353,7 +353,7 @@ CREATE TABLE tp_account_profiles (
`created_at` TIMESTAMP,
PRIMARY KEY (`pk`),
KEY `tpid` (`tpid`),
UNIQUE KEY `unique_tp_account_profiles` (`tpid`,`tenant`,
UNIQUE KEY `unique_tp_accounts` (`tpid`,`tenant`,
`id`,`filter_ids`,`balance_id` )
);

View File

@@ -314,8 +314,8 @@ CREATE TABLE tp_action_profiles (
"filter_ids", "action_id");
DROP TABLE IF EXISTS tp_account_profiles;
CREATE TABLE tp_account_profiles (
DROP TABLE IF EXISTS tp_accounts;
CREATE TABLE tp_accounts (
"pk" SERIAL PRIMARY KEY,
"tpid" varchar(64) NOT NULL,
"tenant" varchar(64) NOT NULL,
@@ -337,8 +337,8 @@ CREATE TABLE tp_account_profiles (
"threshold_ids" varchar(64) NOT NULL,
"created_at" TIMESTAMP WITH TIME ZONE
);
CREATE INDEX tp_account_profiles_ids ON tp_account_profiles (tpid);
CREATE INDEX tp_account_profiles_unique ON tp_account_profiles ("tpid", "tenant", "id",
CREATE INDEX tp_accounts_ids ON tp_accounts (tpid);
CREATE INDEX tp_accounts_unique ON tp_accounts ("tpid", "tenant", "id",
"filter_ids", "balance_id");
--