You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
docuseal/db/migrate/20260506121640_create_templ...

17 lines
556 B

# frozen_string_literal: true
class CreateTemplateVersions < ActiveRecord::Migration[8.1]
def change
create_table :template_versions do |t|
t.references :template, null: false, foreign_key: true, index: false
t.references :account, null: false, foreign_key: true, index: true
t.references :author, null: false, foreign_key: { to_table: :users }, index: true
t.text :data, null: false
t.string :sha1, null: false
t.timestamps
end
add_index :template_versions, %i[template_id sha1], unique: true
end
end