entity scaffold

This commit is contained in:
2023-01-13 20:50:41 +02:00
parent c46ecb73e0
commit 26ea76c8e9
15 changed files with 272 additions and 1 deletions

View 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
View File

@ -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