init push
This commit is contained in:
20
migrations/20260410_opcs.sql
Normal file
20
migrations/20260410_opcs.sql
Normal file
@@ -0,0 +1,20 @@
|
||||
-- +goose Up
|
||||
-- Create opcs table for OPC (Operation Planning Center) master data
|
||||
|
||||
CREATE TABLE IF NOT EXISTS opcs (
|
||||
id BINARY(16) NOT NULL PRIMARY KEY,
|
||||
name VARCHAR(64) NOT NULL UNIQUE,
|
||||
description VARCHAR(255) NULL,
|
||||
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
created_by BINARY(16) NULL,
|
||||
updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
updated_by BINARY(16) NULL,
|
||||
deleted_at DATETIME NULL,
|
||||
deleted_by BINARY(16) NULL,
|
||||
|
||||
KEY idx_opcs_name (name),
|
||||
KEY idx_opcs_deleted_at (deleted_at)
|
||||
);
|
||||
|
||||
-- +goose Down
|
||||
DROP TABLE IF EXISTS opcs;
|
||||
Reference in New Issue
Block a user