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/20230819190316_add_source_t...

20 lines
412 B

# frozen_string_literal: true
class AddSourceToTemplates < ActiveRecord::Migration[7.0]
class MigrationTemplate < ApplicationRecord
self.table_name = 'templates'
end
def up
add_column :templates, :source, :text
MigrationTemplate.where(source: nil).update_all(source: :native)
change_column_null :templates, :source, false
end
def down
drop_column :templates, :source
end
end