chore(schema): create release_notes
This commit is contained in:
parent
a6ea607e7a
commit
0d626f1811
3 changed files with 29 additions and 0 deletions
2
app/models/release_note.rb
Normal file
2
app/models/release_note.rb
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
class ReleaseNote < ApplicationRecord
|
||||||
|
end
|
16
db/migrate/20230912155425_create_release_notes.rb
Normal file
16
db/migrate/20230912155425_create_release_notes.rb
Normal file
|
@ -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
|
11
db/schema.rb
11
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"
|
t.index ["procedure_id"], name: "index_refused_mails_on_procedure_id"
|
||||||
end
|
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|
|
create_table "safe_mailers", force: :cascade do |t|
|
||||||
t.datetime "created_at", precision: 6, null: false
|
t.datetime "created_at", precision: 6, null: false
|
||||||
t.string "forced_delivery_method"
|
t.string "forced_delivery_method"
|
||||||
|
|
Loading…
Reference in a new issue