流程设计
This commit is contained in:
@@ -302,7 +302,7 @@ export const sqliteSchema = `
|
||||
|
||||
CREATE TABLE IF NOT EXISTS workflow_definitions (
|
||||
id TEXT PRIMARY KEY,
|
||||
business_type TEXT NOT NULL CHECK (business_type IN ('profile_change', 'registration_review', 'center_change', 'candidate_account_batch')),
|
||||
business_type TEXT NOT NULL CHECK (business_type IN ('profile_change', 'registration_review', 'center_change', 'candidate_account_batch', 'score_appeal')),
|
||||
name TEXT NOT NULL,
|
||||
active INTEGER NOT NULL DEFAULT 1 CHECK (active IN (0, 1)),
|
||||
updated_by TEXT REFERENCES users(id) ON DELETE SET NULL,
|
||||
@@ -315,7 +315,7 @@ export const sqliteSchema = `
|
||||
workflow_id TEXT NOT NULL REFERENCES workflow_definitions(id) ON DELETE CASCADE,
|
||||
position INTEGER NOT NULL,
|
||||
name TEXT NOT NULL,
|
||||
admin_level TEXT NOT NULL CHECK (admin_level IN ('school', 'super')),
|
||||
admin_level TEXT NOT NULL CHECK (admin_level IN ('class', 'school', 'super')),
|
||||
UNIQUE (workflow_id, position)
|
||||
) STRICT;
|
||||
|
||||
@@ -722,7 +722,7 @@ export const mysqlSchema = [
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci`,
|
||||
`CREATE TABLE IF NOT EXISTS workflow_definitions (
|
||||
id VARCHAR(64) NOT NULL,
|
||||
business_type ENUM('profile_change', 'registration_review', 'center_change', 'candidate_account_batch') NOT NULL,
|
||||
business_type ENUM('profile_change', 'registration_review', 'center_change', 'candidate_account_batch', 'score_appeal') NOT NULL,
|
||||
name VARCHAR(120) NOT NULL,
|
||||
active BOOLEAN NOT NULL DEFAULT TRUE,
|
||||
updated_by VARCHAR(64) NULL,
|
||||
@@ -736,7 +736,7 @@ export const mysqlSchema = [
|
||||
workflow_id VARCHAR(64) NOT NULL,
|
||||
position INT UNSIGNED NOT NULL,
|
||||
name VARCHAR(120) NOT NULL,
|
||||
admin_level ENUM('school', 'super') NOT NULL,
|
||||
admin_level ENUM('class', 'school', 'super') NOT NULL,
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE KEY uq_workflow_steps_position (workflow_id, position),
|
||||
CONSTRAINT fk_workflow_steps_definition FOREIGN KEY (workflow_id) REFERENCES workflow_definitions(id) ON DELETE CASCADE
|
||||
|
||||
Reference in New Issue
Block a user