lib/generators/emailbutler/templates/migration.erb in emailbutler-0.2.2 vs lib/generators/emailbutler/templates/migration.erb in emailbutler-0.2.3
- old
+ new
@@ -7,22 +7,17 @@
t.uuid :uuid, null: false, default: ''
t.string :mailer, null: false
t.string :action, null: false
t.jsonb :params, null: false, default: {}
t.string :send_to, array: true
- t.timestamps
- end
- add_index :emailbutler_messages, :uuid, unique: true
-
- create_table :emailbutler_events do |t|
- t.integer :emailbutler_message_id, null: false, index: true
- t.integer :status, null: false
+ t.integer :status, null: false, default: 0
t.datetime :timestamp
+ t.integer :lock_version
t.timestamps
end
+ add_index :emailbutler_messages, :uuid, unique: true
end
def self.down
drop_table :emailbutler_messages
- drop_table :emailbutler_events
end
end