mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 02:54:20 +00:00
3025ac577b
* search orgs * org by domain * member spooler * member * get roles * tests * types duration * use default func for renew * correct database * reorder migrations * delete unused consts * move get roles to internal * use prepared org by domain * implement org in other objects * add eventstores
50 lines
740 B
PL/PgSQL
50 lines
740 B
PL/PgSQL
BEGIN;
|
|
|
|
CREATE DATABASE admin_api;
|
|
|
|
COMMIT;
|
|
|
|
BEGIN;
|
|
|
|
CREATE TABLE admin_api.orgs (
|
|
id TEXT,
|
|
creation_date TIMESTAMPTZ,
|
|
change_date TIMESTAMPTZ,
|
|
resource_owner TEXT,
|
|
org_state SMALLINT,
|
|
sequence BIGINT,
|
|
|
|
domain TEXT,
|
|
name TEXT,
|
|
|
|
PRIMARY KEY (id)
|
|
);
|
|
|
|
CREATE TABLE admin_api.failed_event (
|
|
view_name TEXT,
|
|
failed_sequence BIGINT,
|
|
failure_count SMALLINT,
|
|
err_msg TEXT,
|
|
|
|
PRIMARY KEY (view_name, failed_sequence)
|
|
);
|
|
|
|
CREATE TABLE admin_api.locks (
|
|
locker_id TEXT,
|
|
locked_until TIMESTAMPTZ,
|
|
object_type TEXT,
|
|
|
|
PRIMARY KEY (object_type)
|
|
);
|
|
|
|
CREATE TABLE admin_api.current_sequences (
|
|
view_name TEXT,
|
|
|
|
current_sequence BIGINT,
|
|
|
|
PRIMARY KEY (view_name)
|
|
);
|
|
|
|
|
|
COMMIT;
|