ref: master
plugins/newsletter/db/migrate/20150717195546_newsletter_plugin_newsletters.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
class NewsletterPluginNewsletters < ActiveRecord::Migration def up create_table :newsletter_plugin_newsletters do |t| t.references :environment, :null => false t.references :person, :null => false t.boolean :enabled, :default => false t.string :subject t.integer :periodicity, :default => 0 t.integer :posts_per_blog, :default => 0 t.integer :image_id t.text :footer t.text :blog_ids t.text :additional_recipients t.boolean :moderated t.text :unsubscribers end add_index :newsletter_plugin_newsletters, :environment_id, :unique => true end def down remove_index :newsletter_plugin_newsletters, :environment_id drop_table :newsletter_plugin_newsletters end end |