Sha256: 4808b3bcbcae173b65c2aa43954a2ea0bf5ddf6f7c0eeb711f65552481b70c43

Contents?: true

Size: 267 Bytes

Versions: 2

Compression:

Stored size: 267 Bytes

Contents

class AddDateToPlutusEntries < ActiveRecord::Migration[4.2]
  def change
    add_column :plutus_entries, :date, :date
    add_index :plutus_entries, :date

		execute <<-SQL
			UPDATE plutus_entries
      SET date = created_at
      WHERE date is null
		SQL
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
plutus-0.16 lib/generators/plutus/templates/add_date_migration.rb
plutus-0.15 lib/generators/plutus/templates/add_date_migration.rb