mirror of
https://github.com/chaitin/MonkeyCode.git
synced 2026-02-05 08:13:22 +08:00
feat: add license migration file
This commit is contained in:
2
backend/migration/000015_create_license_table.down.sql
Normal file
2
backend/migration/000015_create_license_table.down.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
-- Drop license table
|
||||
DROP TABLE IF EXISTS license;
|
||||
13
backend/migration/000015_create_license_table.up.sql
Normal file
13
backend/migration/000015_create_license_table.up.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
-- Create license table
|
||||
CREATE TABLE IF NOT EXISTS license (
|
||||
id SERIAL PRIMARY KEY,
|
||||
type VARCHAR(10) NOT NULL,
|
||||
data BYTEA,
|
||||
code VARCHAR(255),
|
||||
created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- Create indexes
|
||||
CREATE INDEX IF NOT EXISTS idx_license_type ON license (type);
|
||||
CREATE INDEX IF NOT EXISTS idx_license_code ON license (code);
|
||||
CREATE INDEX IF NOT EXISTS idx_license_created_at ON license (created_at);
|
||||
Submodule backend/pro updated: 6320fb5982...50ed94198b
Reference in New Issue
Block a user