Skip to content
Extraits de code Groupes Projets
Valider e47ccd4e rédigé par Ilya Zhitomirskiy's avatar Ilya Zhitomirskiy
Parcourir les fichiers

removed fake migration and migrate.txt

parent f7e70f8d
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
class FakeMigration < ActiveRecord::Migration
def self.up
remove_foreign_key :aspect_visibilities, :posts
remove_foreign_key :post_visibilities, :posts
end
def self.down
end
end
class ShareAnything < ActiveRecord::Migration
def self.up
# add_column :comments, :name, :string
# add_column :comments, :user_id, :integer, :null => false
# add_index :comments, :user_id
# becomes
# execute "ALTER TABLE comments add name varchar(255), add user_id int NOT NULL, add index `index_comments_on_user_id` (`user_id`);"
remove_foreign_key :aspect_visibilities, :posts
start_sql = "ALTER TABLE aspect_visibilities "
sql = []
......@@ -37,6 +34,7 @@ class ShareAnything < ActiveRecord::Migration
remove_foreign_key :post_visibilities, :posts
rename_table :post_visibilities, :share_visibilities
start_sql = "ALTER TABLE share_visibilities "
......
== ShareAnything: migrating ==================================================
-- quote_table_name(:aspect_visibilities)
-> 0.0001s
-- quote_table_name(:aspect_visibilities)
-> 0.0001s
-- execute("ALTER TABLE aspect_visibilities DROP INDEX `index_post_id_and_aspect_id` on `aspect_visibilities`, DROP INDEX `index_aspect_visibilities_on_post_id` on `aspect_visibilities`;")
Ce diff est replié.
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter