diff options
Diffstat (limited to 'db')
| -rw-r--r-- | db/migrate/20240509225147_create_games.rb | 12 | ||||
| -rw-r--r-- | db/schema.rb | 8 |
2 files changed, 19 insertions, 1 deletions
diff --git a/db/migrate/20240509225147_create_games.rb b/db/migrate/20240509225147_create_games.rb new file mode 100644 index 0000000..af8f77b --- /dev/null +++ b/db/migrate/20240509225147_create_games.rb @@ -0,0 +1,12 @@ +class CreateGames < ActiveRecord::Migration[7.1] + def change + create_table :games do |t| + t.string :title + #t.text :body + #t.integer :status, default: 0 + #t.references :user, null: false, foreign_key: true + + t.timestamps + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 69731f6..3131a91 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.1].define(version: 2024_05_03_001922) do +ActiveRecord::Schema[7.1].define(version: 2024_05_09_225147) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -53,6 +53,12 @@ ActiveRecord::Schema[7.1].define(version: 2024_05_03_001922) do t.datetime "updated_at", null: false end + create_table "games", force: :cascade do |t| + t.string "title" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + create_table "users", force: :cascade do |t| t.string "identifier" t.string "access_token_digest" |
