Sha256: 16e63203117bf0575a38a4e521169aaa71b1be94abb2a8955a4a5b04fad76eba
Contents?: true
Size: 645 Bytes
Versions: 3
Compression:
Stored size: 645 Bytes
Contents
class CreateOldVisits < ActiveRecord::Migration def self.up create_table :old_visits do |t| t.column :person_id, :string t.column :elt_id, :string, :null => false t.column :created_on, :datetime, :null => false t.column :updated_on, :datetime t.column :filter, :integer, :default => 0 end execute 'ALTER TABLE old_visits ADD CONSTRAINT old_visits_elt_person_key UNIQUE ( elt_id, person_id ) ' execute 'ALTER TABLE old_visits ADD CONSTRAINT old_visits_elt_id FOREIGN KEY ( elt_id ) REFERENCES elts( id ) ON UPDATE CASCADE ON DELETE CASCADE' end def self.down drop_table :old_visits end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
parlement-0.13 | db/migrate/008_create_old_visits.rb |
parlement-0.14 | db/migrate/008_create_old_visits.rb |
parlement-0.17 | db/migrate/008_create_old_visits.rb |