Scaffold park model
This commit is contained in:
13
db/migrate/20251008044109_create_parks.rb
Normal file
13
db/migrate/20251008044109_create_parks.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
class CreateParks < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
create_table :parks do |t|
|
||||
t.string :code, null: false
|
||||
t.string :name, null: false
|
||||
t.datetime :established_date, null: false
|
||||
t.text :states, null: false
|
||||
t.json :properties, null: false, default: {}
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
11
db/schema.rb
generated
11
db/schema.rb
generated
@@ -10,5 +10,14 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[8.0].define(version: 0) do
|
||||
ActiveRecord::Schema[8.0].define(version: 2025_10_08_044109) do
|
||||
create_table "parks", force: :cascade do |t|
|
||||
t.string "code", null: false
|
||||
t.string "name", null: false
|
||||
t.datetime "established_date", null: false
|
||||
t.text "states", null: false
|
||||
t.json "properties", default: {}, null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user