feat: complete API-driven projects with infrastructure and business acceptance
This commit is contained in:
2
examples/userService/migrations/000001_users.down.sql
Normal file
2
examples/userService/migrations/000001_users.down.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
DROP TABLE user_audit;
|
||||
DROP TABLE users;
|
||||
18
examples/userService/migrations/000001_users.up.sql
Normal file
18
examples/userService/migrations/000001_users.up.sql
Normal file
@@ -0,0 +1,18 @@
|
||||
CREATE TABLE users (
|
||||
id BIGINT NOT NULL AUTO_INCREMENT,
|
||||
name VARCHAR(100) NOT NULL,
|
||||
email VARCHAR(254) NOT NULL,
|
||||
created_at DATETIME(6) NOT NULL,
|
||||
updated_at DATETIME(6) NOT NULL,
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE KEY uq_users_email (email)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
||||
|
||||
CREATE TABLE user_audit (
|
||||
id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
user_id BIGINT NOT NULL,
|
||||
operation VARCHAR(16) NOT NULL,
|
||||
request_id VARCHAR(128) NOT NULL,
|
||||
created_at DATETIME(6) NOT NULL,
|
||||
INDEX ix_user_audit_user (user_id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
||||
Reference in New Issue
Block a user