20220914205000_add_language_table.sql 410 B

123456789101112131415
  1. -- +goose Up
  2. CREATE TABLE language
  3. (
  4. id TINYINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
  5. url CHAR(2) NOT NULL UNIQUE,
  6. title VARCHAR(255) NOT NULL,
  7. is_default BOOL NOT NULL DEFAULT false
  8. );
  9. INSERT INTO language (url, title, is_default)
  10. VALUES ('ru', 'Русский', true),
  11. ('en', 'English', false);
  12. -- +goose Down
  13. DROP TABLE language;