aboutsummaryrefslogtreecommitdiff
path: root/db/migrate/20201006140511_create_resources.rb
blob: c179087c8174e5aea869f1855e598c3b44a5c6dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
class CreateResources < ActiveRecord::Migration[6.0]
  def change
    create_table :resources do |t|
      t.uuid :uuid
      t.jsonb :feature
      t.references :agent, null: false, foreign_key: true

      t.timestamps
    end
    add_index :resources, [:uuid], unique: true
  end
end