20220915102300_add_user_table.sql 371 B

123456789101112
  1. -- +goose Up
  2. CREATE TABLE user
  3. (
  4. id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
  5. username VARCHAR(255) NOT NULL UNIQUE,
  6. password VARCHAR(255) NOT NULL,
  7. created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  8. updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
  9. );
  10. -- +goose Down
  11. DROP TABLE user;