Add naive impl of seeding alerts
This commit is contained in:
@@ -3,6 +3,7 @@ class CreateAlerts < ActiveRecord::Migration[8.0]
|
||||
create_table :alerts do |t|
|
||||
t.string :category, null: false
|
||||
t.text :description
|
||||
t.string :identifier, null: false
|
||||
t.string :park_code, null: false
|
||||
t.string :title, null: false
|
||||
t.string :url
|
||||
@@ -11,6 +12,7 @@ class CreateAlerts < ActiveRecord::Migration[8.0]
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :alerts, :identifier, unique: true
|
||||
add_index :alerts, :park_code
|
||||
add_foreign_key :alerts, :parks, column: :park_code, primary_key: :code
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user