Files
discourse/migrations/db/intermediate_db_schema/004-user_suspensions.sql
Gerhard Schlager 17ba19c7ae REFACTOR: Code generator for migrations IntemerdiateDB
* Splits the existing script into multiple classes
* Adds command for generating IntermediateDB schema (`migrations/bin/cli schema generate`)
* Changes the syntax of the IntermediateDB schema config
* Adds validation for the schema config
* It uses YAML schema aka JSON schema to validate the config file
* It generates the SQL schema file and Ruby classes for storing data in the IntermediateDB
2025-04-07 17:22:36 +02:00

10 lines
226 B
SQL

CREATE TABLE user_suspensions
(
user_id NUMERIC NOT NULL,
suspended_at DATETIME NOT NULL,
suspended_till DATETIME,
suspended_by_id NUMERIC,
reason TEXT,
PRIMARY KEY (user_id, suspended_at)
);