This commit is contained in:
1 parent
afd8d00752
commit
8a5a381b44
23 files changed
+793
-16
No files matched your search
+13
-6
@@ -873,26 +873,33 @@ COMMENT ON TABLE audit_log IS '业务对象变更审计(支付、权益、定
|
||||
-- ============================================================
|
||||
|
||||
CREATE TABLE IF NOT EXISTS drama_classification (
|
||||
id BIGINT PRIMARY KEY,
|
||||
name VARCHAR(64) NOT NULL,
|
||||
sort INTEGER NOT NULL DEFAULT 0,
|
||||
status SMALLINT NOT NULL DEFAULT 1,
|
||||
created_at TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||
id BIGINT PRIMARY KEY,
|
||||
name VARCHAR(64) NOT NULL,
|
||||
code VARCHAR(64),
|
||||
layout_type VARCHAR(16) NOT NULL DEFAULT 'GRID',
|
||||
revision BIGINT NOT NULL DEFAULT 1,
|
||||
sort INTEGER NOT NULL DEFAULT 0,
|
||||
status SMALLINT NOT NULL DEFAULT 1,
|
||||
created_at TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS uk_drama_classification_name ON drama_classification (name);
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS uk_drama_classification_code ON drama_classification (code);
|
||||
COMMENT ON TABLE drama_classification IS '运营分类;与短剧类型(drama_category)相互独立';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS drama_classification_drama (
|
||||
id BIGINT PRIMARY KEY,
|
||||
classification_id BIGINT NOT NULL,
|
||||
drama_id BIGINT NOT NULL,
|
||||
position INTEGER NOT NULL DEFAULT 0,
|
||||
created_at TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS uk_classification_drama
|
||||
ON drama_classification_drama (classification_id, drama_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_classification_drama_drama
|
||||
ON drama_classification_drama (drama_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_classification_drama_position
|
||||
ON drama_classification_drama (classification_id, position, id);
|
||||
COMMENT ON TABLE drama_classification_drama IS '分类与短剧的关联关系';
|
||||
|
||||
-- ============================================================
|
||||
|
||||
Reference in new issue
Block a user