diff options
author | Matthew Lemon <y@yulqen.org> | 2023-12-20 20:34:25 +0000 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2023-12-20 20:34:25 +0000 |
commit | 6b1a1834ad1715145f047790c8391b8a5558bece (patch) | |
tree | e20cdddb20477b56a013eb3bc357b9b5ff0488a3 /db/schema.rb | |
parent | a3e98876e2f88b69fef2a9da7d65b3704b6bf0d2 (diff) |
Created new Operation model and fixed Event associations with it
Diffstat (limited to '')
-rw-r--r-- | db/schema.rb | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/db/schema.rb b/db/schema.rb index 07579bb..4ad3bbd 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,14 +10,22 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.1].define(version: 2023_12_18_190546) do +ActiveRecord::Schema[7.1].define(version: 2023_12_20_202718) do create_table "events", force: :cascade do |t| t.date "date" t.string "name" t.datetime "created_at", null: false t.datetime "updated_at", null: false + t.integer "operation_id", null: false + t.index ["operation_id"], name: "index_events_on_operation_id" + end + + create_table "operations", force: :cascade do |t| + t.string "name" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "organisation_id", null: false - t.index ["organisation_id"], name: "index_events_on_organisation_id" + t.index ["organisation_id"], name: "index_operations_on_organisation_id" end create_table "organisations", force: :cascade do |t| @@ -26,5 +34,6 @@ ActiveRecord::Schema[7.1].define(version: 2023_12_18_190546) do t.datetime "updated_at", null: false end - add_foreign_key "events", "organisations" + add_foreign_key "events", "operations" + add_foreign_key "operations", "organisations" end |