demarches-normaliennes/db/migrate/20230912155425_create_release_notes.rb
2024-08-22 09:26:48 +02:00

17 lines
452 B
Ruby

# frozen_string_literal: true
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