mirror of
				https://github.com/scinote-eln/scinote-web.git
				synced 2025-10-28 23:18:10 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			13 lines
		
	
	
	
		
			325 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
	
		
			325 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
| class AddPublishedOnToProtocols < ActiveRecord::Migration
 | |
|   def up
 | |
|     add_column :protocols, :published_on, :datetime
 | |
| 
 | |
|     Protocol.where(protocol_type: :in_repository_public).find_each do |p|
 | |
|       p.update_column(:published_on, p.created_at)
 | |
|     end
 | |
|   end
 | |
| 
 | |
|   def down
 | |
|     remove_column :protocols, :published_on
 | |
|   end
 | |
| end
 |