aboutsummaryrefslogtreecommitdiff
path: root/db/migrate/20240224162412_create_things.rb
blob: 5fca815cd3353b8d92c6a68171f42a59d4e4656c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
class CreateThings < ActiveRecord::Migration[7.1]
  def change
    create_table :things do |t|
      t.string :target
      t.string :title, null: false, index: { unique: true }
      t.string :publisher
      t.string :address
      t.integer :year
      t.string :url
      t.datetime :access
      t.string :location
      t.string :insideof
      t.string :pages
      t.references :user, null: false, foreign_key: true
      t.integer :rate
      t.integer :status
      t.integer :kind
      t.datetime :bought_at

      t.timestamps
    end
  end
end