entity scaffold
This commit is contained in:
11
db/migrate/20230113170732_create_entities.rb
Normal file
11
db/migrate/20230113170732_create_entities.rb
Normal file
@ -0,0 +1,11 @@
|
||||
class CreateEntities < ActiveRecord::Migration[7.0]
|
||||
def change
|
||||
create_table :entities do |t|
|
||||
t.string :name
|
||||
t.string :ha_id
|
||||
t.string :type
|
||||
t.references :member
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
12
db/schema.rb
generated
12
db/schema.rb
generated
@ -10,10 +10,20 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.0].define(version: 2022_12_31_154221) do
|
||||
ActiveRecord::Schema[7.0].define(version: 2023_01_13_170732) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
||||
create_table "entities", force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.string "ha_id"
|
||||
t.string "type"
|
||||
t.bigint "member_id"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["member_id"], name: "index_entities_on_member_id"
|
||||
end
|
||||
|
||||
create_table "friendly_id_slugs", force: :cascade do |t|
|
||||
t.string "slug", null: false
|
||||
t.integer "sluggable_id", null: false
|
||||
|
Reference in New Issue
Block a user