mirror of https://github.com/docusealco/docuseal
				
				
				
			
			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.
		
		
		
		
		
			
		
			
				
					
					
						
							20 lines
						
					
					
						
							428 B
						
					
					
				
			
		
		
	
	
							20 lines
						
					
					
						
							428 B
						
					
					
				# frozen_string_literal: true
 | 
						|
 | 
						|
class AddSourceToSubmissions < ActiveRecord::Migration[7.0]
 | 
						|
  class MigrationSubmission < ApplicationRecord
 | 
						|
    self.table_name = 'submissions'
 | 
						|
  end
 | 
						|
 | 
						|
  def up
 | 
						|
    add_column :submissions, :source, :string
 | 
						|
 | 
						|
    MigrationSubmission.where(source: nil).update_all(source: :invite)
 | 
						|
 | 
						|
    change_column_null :submissions, :source, false
 | 
						|
  end
 | 
						|
 | 
						|
  def down
 | 
						|
    drop_column :submissions, :source
 | 
						|
  end
 | 
						|
end
 |