|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
-- Table AP_APP
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AP_APP]') AND TYPE IN (N'U'))
|
|
|
|
|
CREATE TABLE AP_APP(
|
|
|
|
|
ID INTEGER NOT NULL IDENTITY,
|
|
|
|
|
NAME VARCHAR(350) NOT NULL,
|
|
|
|
@ -18,6 +19,7 @@ CREATE TABLE AP_APP(
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
-- Table AP_APP_RELEASE
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AP_APP_RELEASE]') AND TYPE IN (N'U'))
|
|
|
|
|
CREATE TABLE AP_APP_RELEASE(
|
|
|
|
|
ID INTEGER NOT NULL IDENTITY,
|
|
|
|
|
DESCRIPTION VARCHAR(max) NOT NULL,
|
|
|
|
@ -52,6 +54,7 @@ CREATE INDEX fk_AP_APP_RELEASE_AP_APP1_idx ON AP_APP_RELEASE (AP_APP_ID ASC);
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
-- Table AP_APP_REVIEW
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AP_APP_REVIEW]') AND TYPE IN (N'U'))
|
|
|
|
|
CREATE TABLE AP_APP_REVIEW(
|
|
|
|
|
ID INTEGER NOT NULL IDENTITY,
|
|
|
|
|
TENANT_ID INTEGER NOT NULL,
|
|
|
|
@ -74,6 +77,7 @@ CREATE INDEX fk_AP_APP_COMMENT_AP_APP_RELEASE1_idx ON AP_APP_REVIEW (AP_APP_RELE
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
-- Table AP_APP_LIFECYCLE_STATE
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AP_APP_LIFECYCLE_STATE]') AND TYPE IN (N'U'))
|
|
|
|
|
CREATE TABLE AP_APP_LIFECYCLE_STATE(
|
|
|
|
|
ID INTEGER NOT NULL IDENTITY,
|
|
|
|
|
CURRENT_STATE VARCHAR(45) NOT NULL,
|
|
|
|
@ -93,6 +97,7 @@ CREATE INDEX fk_AP_APP_LIFECYCLE_STATE_AP_APP_RELEASE1_idx ON AP_APP_LIFECYCLE_S
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
-- Table AP_APP_TAG
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AP_APP_TAG]') AND TYPE IN (N'U'))
|
|
|
|
|
CREATE TABLE AP_APP_TAG(
|
|
|
|
|
ID INTEGER NOT NULL IDENTITY,
|
|
|
|
|
TENANT_ID INTEGER NOT NULL,
|
|
|
|
@ -103,6 +108,7 @@ CREATE TABLE AP_APP_TAG(
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
-- Table AP_DEVICE_SUBSCRIPTION
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AP_DEVICE_SUBSCRIPTION]') AND TYPE IN (N'U'))
|
|
|
|
|
CREATE TABLE AP_DEVICE_SUBSCRIPTION(
|
|
|
|
|
ID INTEGER NOT NULL IDENTITY,
|
|
|
|
|
TENANT_ID INTEGER NOT NULL,
|
|
|
|
@ -126,6 +132,7 @@ CREATE INDEX fk_AP_DEVICE_SUBSCRIPTION_AP_APP_RELEASE1_idx ON AP_DEVICE_SUBSCRIP
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
-- Table AP_GROUP_SUBSCRIPTION
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AP_GROUP_SUBSCRIPTION]') AND TYPE IN (N'U'))
|
|
|
|
|
CREATE TABLE AP_GROUP_SUBSCRIPTION(
|
|
|
|
|
ID INTEGER NOT NULL IDENTITY,
|
|
|
|
|
TENANT_ID INTEGER NOT NULL,
|
|
|
|
@ -146,6 +153,7 @@ CREATE INDEX fk_AP_GROUP_SUBSCRIPTION_AP_APP_RELEASE1_idx ON AP_GROUP_SUBSCRIPTI
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
-- Table AP_ROLE_SUBSCRIPTION
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AP_ROLE_SUBSCRIPTION]') AND TYPE IN (N'U'))
|
|
|
|
|
CREATE TABLE AP_ROLE_SUBSCRIPTION(
|
|
|
|
|
ID INTEGER NOT NULL IDENTITY,
|
|
|
|
|
TENANT_ID INTEGER NOT NULL,
|
|
|
|
@ -166,6 +174,7 @@ CREATE INDEX fk_AP_ROLE_SUBSCRIPTION_AP_APP_RELEASE1_idx ON AP_ROLE_SUBSCRIPTION
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
-- Table AP_UNRESTRICTED_ROLE
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AP_UNRESTRICTED_ROLE]') AND TYPE IN (N'U'))
|
|
|
|
|
CREATE TABLE AP_UNRESTRICTED_ROLE(
|
|
|
|
|
ID INTEGER NOT NULL IDENTITY,
|
|
|
|
|
TENANT_ID INTEGER NOT NULL,
|
|
|
|
@ -181,6 +190,7 @@ CREATE INDEX fk_AP_APP_VISIBILITY_AP_APP1_idx ON AP_UNRESTRICTED_ROLE (AP_APP_ID
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
-- Table AP_USER_SUBSCRIPTION
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AP_USER_SUBSCRIPTION]') AND TYPE IN (N'U'))
|
|
|
|
|
CREATE TABLE AP_USER_SUBSCRIPTION(
|
|
|
|
|
ID INTEGER NOT NULL IDENTITY,
|
|
|
|
|
TENANT_ID INTEGER NOT NULL,
|
|
|
|
@ -201,6 +211,7 @@ CREATE INDEX fk_AP_USER_SUBSCRIPTION_AP_APP_RELEASE1_idx ON AP_USER_SUBSCRIPTION
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
-- Table AP_APP_CATEGORY
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AP_APP_CATEGORY]') AND TYPE IN (N'U'))
|
|
|
|
|
CREATE TABLE AP_APP_CATEGORY(
|
|
|
|
|
ID INTEGER NOT NULL IDENTITY,
|
|
|
|
|
TENANT_ID INTEGER NOT NULL,
|
|
|
|
@ -212,6 +223,7 @@ CREATE TABLE AP_APP_CATEGORY(
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
-- Table AP_APP_TAG_MAPPING
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AP_APP_TAG_MAPPING]') AND TYPE IN (N'U'))
|
|
|
|
|
CREATE TABLE AP_APP_TAG_MAPPING(
|
|
|
|
|
ID INTEGER NOT NULL IDENTITY,
|
|
|
|
|
TENANT_ID INTEGER NOT NULL,
|
|
|
|
@ -231,6 +243,7 @@ CREATE INDEX fk_AP_APP_TAG_copy1_AP_APP1_idx ON AP_APP_TAG_MAPPING (AP_APP_ID AS
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
-- Table AP_APP_CATEGORY_MAPPING
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AP_APP_CATEGORY_MAPPING]') AND TYPE IN (N'U'))
|
|
|
|
|
CREATE TABLE AP_APP_CATEGORY_MAPPING(
|
|
|
|
|
ID INTEGER NOT NULL IDENTITY,
|
|
|
|
|
TENANT_ID INTEGER NOT NULL,
|
|
|
|
@ -250,6 +263,7 @@ CREATE INDEX fk_AP_APP_CATEGORY_copy1_AP_APP1_idx ON AP_APP_CATEGORY_MAPPING (AP
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
-- Table AP_APP_SUB_OP_MAPPING
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AP_APP_SUB_OP_MAPPING]') AND TYPE IN (N'U'))
|
|
|
|
|
CREATE TABLE AP_APP_SUB_OP_MAPPING (
|
|
|
|
|
ID INTEGER NOT NULL IDENTITY,
|
|
|
|
|
TENANT_ID INTEGER NOT NULL,
|
|
|
|
@ -265,6 +279,7 @@ CREATE INDEX fk_AP_APP_SUB_OP_MAPPING_AP_DEVICE_SUBSCRIPTION1_idx ON AP_APP_SUB_
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
-- Table AP_SCHEDULED_SUBSCRIPTION
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AP_SCHEDULED_SUBSCRIPTION]') AND TYPE IN (N'U'))
|
|
|
|
|
CREATE TABLE AP_SCHEDULED_SUBSCRIPTION(
|
|
|
|
|
ID INTEGER NOT NULL IDENTITY,
|
|
|
|
|
TASK_NAME VARCHAR(100) NOT NULL,
|
|
|
|
@ -284,7 +299,8 @@ CREATE TABLE AP_SCHEDULED_SUBSCRIPTION(
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
-- Table AP_IDENTITY_SERVER
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
CREATE TABLE IF NOT EXISTS AP_IDENTITY_SERVER (
|
|
|
|
|
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AP_IDENTITY_SERVER]') AND TYPE IN (N'U'))
|
|
|
|
|
CREATE TABLE AP_IDENTITY_SERVER (
|
|
|
|
|
ID INTEGER NOT NULL IDENTITY,
|
|
|
|
|
NAME VARCHAR(255) NOT NULL,
|
|
|
|
|
PROVIDER_NAME VARCHAR(255) NOT NULL,
|
|
|
|
@ -299,8 +315,9 @@ CREATE TABLE IF NOT EXISTS AP_IDENTITY_SERVER (
|
|
|
|
|
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
-- Table AP_IS_SP_APP_MAPPING
|
|
|
|
|
-- -----------------------------------------------------;
|
|
|
|
|
CREATE TABLE IF NOT EXISTS AP_IS_SP_APP_MAPPING (
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AP_IS_SP_APP_MAPPING]') AND TYPE IN (N'U'))
|
|
|
|
|
CREATE TABLE AP_IS_SP_APP_MAPPING (
|
|
|
|
|
ID INTEGER NOT NULL IDENTITY,
|
|
|
|
|
SP_UID VARCHAR(255) NOT NULL,
|
|
|
|
|
AP_APP_ID INT NOT NULL,
|
|
|
|
@ -314,7 +331,8 @@ CREATE TABLE IF NOT EXISTS AP_IS_SP_APP_MAPPING (
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
-- Table AP_APP_FAVOURITES
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
|
|
CREATE TABLE IF NOT EXISTS AP_APP_FAVOURITES(
|
|
|
|
|
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[AP_APP_FAVOURITES]') AND TYPE IN (N'U'))
|
|
|
|
|
CREATE TABLE AP_APP_FAVOURITES(
|
|
|
|
|
ID INTEGER NOT NULL IDENTITY,
|
|
|
|
|
AP_APP_ID INTEGER NOT NULL,
|
|
|
|
|
USER_NAME VARCHAR(100) NOT NULL,
|
|
|
|
|