Title / Description
Code class CreateVoitures < ActiveRecord::Migration def self.up create_table :voitures do |t| t.string :immatriculation t.string :marque t.string :modele t.string :couleur t.timestamps end end def self.down drop_table :voitures end end class AddMarqueIdToVoiture < ActiveRecord::Migration def self.up add_column :voitures, :marque_id, :integer end def self.down remove_column :voitures, :marque_id end end
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code