From 0d626f1811c58521e9fc44658854cb01c412fe62 Mon Sep 17 00:00:00 2001 From: Colin Darie Date: Tue, 3 Oct 2023 16:14:09 +0200 Subject: [PATCH] chore(schema): create release_notes --- app/models/release_note.rb | 2 ++ .../20230912155425_create_release_notes.rb | 16 ++++++++++++++++ db/schema.rb | 11 +++++++++++ 3 files changed, 29 insertions(+) create mode 100644 app/models/release_note.rb create mode 100644 db/migrate/20230912155425_create_release_notes.rb diff --git a/app/models/release_note.rb b/app/models/release_note.rb new file mode 100644 index 000000000..8fe5152b2 --- /dev/null +++ b/app/models/release_note.rb @@ -0,0 +1,2 @@ +class ReleaseNote < ApplicationRecord +end diff --git a/db/migrate/20230912155425_create_release_notes.rb b/db/migrate/20230912155425_create_release_notes.rb new file mode 100644 index 000000000..0f05ee7f1 --- /dev/null +++ b/db/migrate/20230912155425_create_release_notes.rb @@ -0,0 +1,16 @@ +class CreateReleaseNotes < ActiveRecord::Migration[7.0] + def change + create_table :release_notes do |t| + t.date :released_on + t.text :body, default: nil + t.boolean :published, default: false, null: false + t.string :categories, array: true, default: [] + + t.timestamps + end + + add_index :release_notes, :released_on + add_index :release_notes, :published + add_index :release_notes, :categories, using: :gin + end +end diff --git a/db/schema.rb b/db/schema.rb index 8c12445ca..1b8716f21 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -896,6 +896,17 @@ ActiveRecord::Schema[7.0].define(version: 2023_10_26_161609) do t.index ["procedure_id"], name: "index_refused_mails_on_procedure_id" end + create_table "release_notes", force: :cascade do |t| + t.text "body" + t.string "categories", default: [], array: true + t.datetime "created_at", null: false + t.boolean "published", default: false, null: false + t.date "released_on" + t.datetime "updated_at", null: false + t.index ["categories"], name: "index_release_notes_on_categories", using: :gin + t.index ["published"], name: "index_release_notes_on_published" + end + create_table "safe_mailers", force: :cascade do |t| t.datetime "created_at", precision: 6, null: false t.string "forced_delivery_method"