mock shop sync group listing draft page
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
BEGIN;
|
||||
|
||||
|
||||
DROP TABLE mock.shop_amazon_sync_group_listing_drafts;
|
||||
DROP TABLE mock.shop_big_cartel_sync_group_listing_drafts;
|
||||
DROP TABLE mock.shop_ebay_sync_group_listing_drafts;
|
||||
DROP TABLE mock.shop_ecwid_sync_group_listing_drafts;
|
||||
DROP TABLE mock.shop_etsy_sync_group_listing_drafts;
|
||||
DROP TABLE mock.shop_shopify_sync_group_listing_drafts;
|
||||
DROP TABLE mock.shop_square_online_sync_group_listing_drafts;
|
||||
DROP TABLE mock.shop_squarespace_sync_group_listing_drafts;
|
||||
DROP TABLE mock.shop_tiktok_sync_group_listing_drafts;
|
||||
DROP TABLE mock.shop_walmart_marketplace_sync_group_listing_drafts;
|
||||
DROP TABLE mock.shop_wix_sync_group_listing_drafts;
|
||||
DROP TABLE mock.shop_woo_commerce_sync_group_listing_drafts;
|
||||
DROP TABLE mock.shop_zoho_sync_group_listing_drafts;
|
||||
DROP TABLE mock.sync_group_listing_draft_order_indexes;
|
||||
|
||||
|
||||
COMMIT;
|
||||
@@ -0,0 +1,155 @@
|
||||
BEGIN;
|
||||
|
||||
|
||||
CREATE TABLE mock.sync_group_listing_draft_order_indexes (
|
||||
account_id INTEGER NOT NULL REFERENCES mock.accounts,
|
||||
order_index INTEGER NOT NULL CHECK (order_index >= 0),
|
||||
|
||||
PRIMARY KEY (account_id, order_index)
|
||||
);
|
||||
|
||||
CREATE TABLE mock.shop_amazon_sync_group_listing_drafts (
|
||||
account_id INTEGER NOT NULL REFERENCES mock.accounts,
|
||||
order_index INTEGER NOT NULL,
|
||||
shop_id TEXT NOT NULL,
|
||||
listing_id TEXT,
|
||||
|
||||
PRIMARY KEY (account_id, order_index),
|
||||
UNIQUE (account_id, shop_id),
|
||||
FOREIGN KEY (account_id, order_index) REFERENCES mock.sync_group_listing_draft_order_indexes ON DELETE CASCADE
|
||||
);
|
||||
|
||||
CREATE TABLE mock.shop_big_cartel_sync_group_listing_drafts (
|
||||
account_id INTEGER NOT NULL REFERENCES mock.accounts,
|
||||
order_index INTEGER NOT NULL,
|
||||
shop_id TEXT NOT NULL,
|
||||
listing_id TEXT,
|
||||
|
||||
PRIMARY KEY (account_id, order_index),
|
||||
UNIQUE (account_id, shop_id),
|
||||
FOREIGN KEY (account_id, order_index) REFERENCES mock.sync_group_listing_draft_order_indexes ON DELETE CASCADE
|
||||
);
|
||||
|
||||
CREATE TABLE mock.shop_ebay_sync_group_listing_drafts (
|
||||
account_id INTEGER NOT NULL REFERENCES mock.accounts,
|
||||
order_index INTEGER NOT NULL,
|
||||
shop_id TEXT NOT NULL,
|
||||
listing_id TEXT,
|
||||
|
||||
PRIMARY KEY (account_id, order_index),
|
||||
UNIQUE (account_id, shop_id),
|
||||
FOREIGN KEY (account_id, order_index) REFERENCES mock.sync_group_listing_draft_order_indexes ON DELETE CASCADE
|
||||
);
|
||||
|
||||
CREATE TABLE mock.shop_ecwid_sync_group_listing_drafts (
|
||||
account_id INTEGER NOT NULL REFERENCES mock.accounts,
|
||||
order_index INTEGER NOT NULL,
|
||||
shop_id TEXT NOT NULL,
|
||||
listing_id TEXT,
|
||||
|
||||
PRIMARY KEY (account_id, order_index),
|
||||
UNIQUE (account_id, shop_id),
|
||||
FOREIGN KEY (account_id, order_index) REFERENCES mock.sync_group_listing_draft_order_indexes ON DELETE CASCADE
|
||||
);
|
||||
|
||||
CREATE TABLE mock.shop_etsy_sync_group_listing_drafts (
|
||||
account_id INTEGER NOT NULL REFERENCES mock.accounts,
|
||||
order_index INTEGER NOT NULL,
|
||||
shop_id TEXT NOT NULL,
|
||||
listing_id TEXT,
|
||||
|
||||
PRIMARY KEY (account_id, order_index),
|
||||
UNIQUE (account_id, shop_id),
|
||||
FOREIGN KEY (account_id, order_index) REFERENCES mock.sync_group_listing_draft_order_indexes ON DELETE CASCADE
|
||||
);
|
||||
|
||||
CREATE TABLE mock.shop_shopify_sync_group_listing_drafts (
|
||||
account_id INTEGER NOT NULL REFERENCES mock.accounts,
|
||||
order_index INTEGER NOT NULL,
|
||||
shop_id TEXT NOT NULL,
|
||||
listing_id TEXT,
|
||||
|
||||
PRIMARY KEY (account_id, order_index),
|
||||
UNIQUE (account_id, shop_id),
|
||||
FOREIGN KEY (account_id, order_index) REFERENCES mock.sync_group_listing_draft_order_indexes ON DELETE CASCADE
|
||||
);
|
||||
|
||||
CREATE TABLE mock.shop_square_online_sync_group_listing_drafts (
|
||||
account_id INTEGER NOT NULL REFERENCES mock.accounts,
|
||||
order_index INTEGER NOT NULL,
|
||||
shop_id TEXT NOT NULL,
|
||||
listing_id TEXT,
|
||||
|
||||
PRIMARY KEY (account_id, order_index),
|
||||
UNIQUE (account_id, shop_id),
|
||||
FOREIGN KEY (account_id, order_index) REFERENCES mock.sync_group_listing_draft_order_indexes ON DELETE CASCADE
|
||||
);
|
||||
|
||||
CREATE TABLE mock.shop_squarespace_sync_group_listing_drafts (
|
||||
account_id INTEGER NOT NULL REFERENCES mock.accounts,
|
||||
order_index INTEGER NOT NULL,
|
||||
shop_id TEXT NOT NULL,
|
||||
listing_id TEXT,
|
||||
|
||||
PRIMARY KEY (account_id, order_index),
|
||||
UNIQUE (account_id, shop_id),
|
||||
FOREIGN KEY (account_id, order_index) REFERENCES mock.sync_group_listing_draft_order_indexes ON DELETE CASCADE
|
||||
);
|
||||
|
||||
CREATE TABLE mock.shop_tiktok_sync_group_listing_drafts (
|
||||
account_id INTEGER NOT NULL REFERENCES mock.accounts,
|
||||
order_index INTEGER NOT NULL,
|
||||
shop_id TEXT NOT NULL,
|
||||
listing_id TEXT,
|
||||
|
||||
PRIMARY KEY (account_id, order_index),
|
||||
UNIQUE (account_id, shop_id),
|
||||
FOREIGN KEY (account_id, order_index) REFERENCES mock.sync_group_listing_draft_order_indexes ON DELETE CASCADE
|
||||
);
|
||||
|
||||
CREATE TABLE mock.shop_walmart_marketplace_sync_group_listing_drafts (
|
||||
account_id INTEGER NOT NULL REFERENCES mock.accounts,
|
||||
order_index INTEGER NOT NULL,
|
||||
shop_id TEXT NOT NULL,
|
||||
listing_id TEXT,
|
||||
|
||||
PRIMARY KEY (account_id, order_index),
|
||||
UNIQUE (account_id, shop_id),
|
||||
FOREIGN KEY (account_id, order_index) REFERENCES mock.sync_group_listing_draft_order_indexes ON DELETE CASCADE
|
||||
);
|
||||
|
||||
CREATE TABLE mock.shop_wix_sync_group_listing_drafts (
|
||||
account_id INTEGER NOT NULL REFERENCES mock.accounts,
|
||||
order_index INTEGER NOT NULL,
|
||||
shop_id TEXT NOT NULL,
|
||||
listing_id TEXT,
|
||||
|
||||
PRIMARY KEY (account_id, order_index),
|
||||
UNIQUE (account_id, shop_id),
|
||||
FOREIGN KEY (account_id, order_index) REFERENCES mock.sync_group_listing_draft_order_indexes ON DELETE CASCADE
|
||||
);
|
||||
|
||||
CREATE TABLE mock.shop_woo_commerce_sync_group_listing_drafts (
|
||||
account_id INTEGER NOT NULL REFERENCES mock.accounts,
|
||||
order_index INTEGER NOT NULL,
|
||||
shop_id TEXT NOT NULL,
|
||||
listing_id TEXT,
|
||||
|
||||
PRIMARY KEY (account_id, order_index),
|
||||
UNIQUE (account_id, shop_id),
|
||||
FOREIGN KEY (account_id, order_index) REFERENCES mock.sync_group_listing_draft_order_indexes ON DELETE CASCADE
|
||||
);
|
||||
|
||||
CREATE TABLE mock.shop_zoho_sync_group_listing_drafts (
|
||||
account_id INTEGER NOT NULL REFERENCES mock.accounts,
|
||||
order_index INTEGER NOT NULL,
|
||||
shop_id TEXT NOT NULL,
|
||||
listing_id TEXT,
|
||||
|
||||
PRIMARY KEY (account_id, order_index),
|
||||
UNIQUE (account_id, shop_id),
|
||||
FOREIGN KEY (account_id, order_index) REFERENCES mock.sync_group_listing_draft_order_indexes ON DELETE CASCADE
|
||||
);
|
||||
|
||||
|
||||
COMMIT;
|
||||
Reference in New Issue
Block a user