mirror of
https://github.com/docusealco/docuseal
synced 2026-11-08 23:42:32 -05:00
add source to templates
This commit is contained in:
1 parent
46f350217a
commit
8e39f0078d
3 files changed
+23
-1
No files matched your search
@@ -0,0 +1,19 @@
|
||||
# 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
|
||||
Reference in new issue
Block a user