demarches-normaliennes/db/migrate/20230912155425_create_release_notes.rb
2023-11-08 18:22:11 +01:00

15 lines
421 B
Ruby

class CreateReleaseNotes < ActiveRecord::Migration[7.0]
def change
create_table :release_notes do |t|
t.date :released_on
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