1
0
Fork 0
forked from OpenNeo/impress

Oops, should've used migration version 4.2

Oh I didn't realize the lowest version Rails had for this is 4.2. I wish running `rake db:migrate` checked this, but I'm running into it on another branch when I try to create a *new* migration which for some reason leads it to inspect the old migrations and notice the issue. Weird!
This commit is contained in:
Emi Matchu 2023-08-06 17:49:58 -07:00
parent 60284a87cc
commit b2a027fbbf
57 changed files with 57 additions and 57 deletions

View file

@ -1,4 +1,4 @@
class CreateOutfits < ActiveRecord::Migration[3.2] class CreateOutfits < ActiveRecord::Migration[4.2]
def self.up def self.up
create_table :outfits do |t| create_table :outfits do |t|
t.integer :pet_state_id t.integer :pet_state_id

View file

@ -1,4 +1,4 @@
class CreateItemOutfitRelationships < ActiveRecord::Migration[3.2] class CreateItemOutfitRelationships < ActiveRecord::Migration[4.2]
def self.up def self.up
create_table :item_outfit_relationships do |t| create_table :item_outfit_relationships do |t|
t.integer :item_id t.integer :item_id

View file

@ -1,4 +1,4 @@
class AddNameAndStarredToOutfits < ActiveRecord::Migration[3.2] class AddNameAndStarredToOutfits < ActiveRecord::Migration[4.2]
def self.up def self.up
add_column :outfits, :name, :string, :null => false add_column :outfits, :name, :string, :null => false
add_column :outfits, :starred, :boolean, :default => false, :null => false add_column :outfits, :starred, :boolean, :default => false, :null => false

View file

@ -1,4 +1,4 @@
class TreatSoldInMallAsABoolean < ActiveRecord::Migration[3.2] class TreatSoldInMallAsABoolean < ActiveRecord::Migration[4.2]
def self.up def self.up
change_column :objects, :sold_in_mall, :boolean, :null => false change_column :objects, :sold_in_mall, :boolean, :null => false
end end

View file

@ -1,4 +1,4 @@
class AllowNullForSomeObjectsFields < ActiveRecord::Migration[3.2] class AllowNullForSomeObjectsFields < ActiveRecord::Migration[4.2]
def self.up def self.up
change_column :objects, :category, :string, :limit => 50, :null => true change_column :objects, :category, :string, :limit => 50, :null => true
change_column :objects, :type, :string, :limit => 50, :null => true change_column :objects, :type, :string, :limit => 50, :null => true

View file

@ -1,4 +1,4 @@
class AddSwfAssetsTypeAndIdIndex < ActiveRecord::Migration[3.2] class AddSwfAssetsTypeAndIdIndex < ActiveRecord::Migration[4.2]
def self.up def self.up
add_index "swf_assets", ["type", "id"], :name => "swf_assets_type_and_id" add_index "swf_assets", ["type", "id"], :name => "swf_assets_type_and_id"
end end

View file

@ -1,4 +1,4 @@
class UsersDevise < ActiveRecord::Migration[3.2] class UsersDevise < ActiveRecord::Migration[4.2]
def self.up def self.up
change_table :users do |t| change_table :users do |t|
t.rememberable t.rememberable

View file

@ -1,4 +1,4 @@
class GuestOutfits < ActiveRecord::Migration[3.2] class GuestOutfits < ActiveRecord::Migration[4.2]
def self.up def self.up
change_column :outfits, :name, :string, :null => true change_column :outfits, :name, :string, :null => true
end end

View file

@ -1,4 +1,4 @@
class AddHasImageToSwfAssets < ActiveRecord::Migration[3.2] class AddHasImageToSwfAssets < ActiveRecord::Migration[4.2]
def self.up def self.up
add_column :swf_assets, :has_image, :boolean, :null => false, :default => false add_column :swf_assets, :has_image, :boolean, :null => false, :default => false
end end

View file

@ -1,4 +1,4 @@
class AddImageRequestedToSwfAssets < ActiveRecord::Migration[3.2] class AddImageRequestedToSwfAssets < ActiveRecord::Migration[4.2]
def self.up def self.up
add_column :swf_assets, :image_requested, :boolean, :null => false, :default => false add_column :swf_assets, :image_requested, :boolean, :null => false, :default => false
end end

View file

@ -1,4 +1,4 @@
class AddImageModeTesterToUsers < ActiveRecord::Migration[3.2] class AddImageModeTesterToUsers < ActiveRecord::Migration[4.2]
def self.up def self.up
add_column :users, :image_mode_tester, :boolean, :default => false, :null => false add_column :users, :image_mode_tester, :boolean, :default => false, :null => false
end end

View file

@ -1,4 +1,4 @@
class CreateClosetHangers < ActiveRecord::Migration[3.2] class CreateClosetHangers < ActiveRecord::Migration[4.2]
def self.up def self.up
create_table :closet_hangers do |t| create_table :closet_hangers do |t|
t.integer :item_id t.integer :item_id

View file

@ -1,4 +1,4 @@
class SetClosetHangersQuantityDefaultToZero < ActiveRecord::Migration[3.2] class SetClosetHangersQuantityDefaultToZero < ActiveRecord::Migration[4.2]
def self.up def self.up
end end

View file

@ -1,4 +1,4 @@
class AddNeopetsUsernameToUsers < ActiveRecord::Migration[3.2] class AddNeopetsUsernameToUsers < ActiveRecord::Migration[4.2]
def self.up def self.up
add_column :users, :neopets_username, :string add_column :users, :neopets_username, :string
end end

View file

@ -1,4 +1,4 @@
class AddOwnedToClosetHangers < ActiveRecord::Migration[3.2] class AddOwnedToClosetHangers < ActiveRecord::Migration[4.2]
def self.up def self.up
add_column :closet_hangers, :owned, :boolean, :null => false, :default => true add_column :closet_hangers, :owned, :boolean, :null => false, :default => true
end end

View file

@ -1,4 +1,4 @@
class CreateClosetLists < ActiveRecord::Migration[3.2] class CreateClosetLists < ActiveRecord::Migration[4.2]
def self.up def self.up
create_table :closet_lists do |t| create_table :closet_lists do |t|
t.string :name t.string :name

View file

@ -1,4 +1,4 @@
class AddClosetHangersVisibilityToUsers < ActiveRecord::Migration[3.2] class AddClosetHangersVisibilityToUsers < ActiveRecord::Migration[4.2]
def self.up def self.up
add_column :users, :owned_closet_hangers_visibility, :integer, :null => false, :default => 1 add_column :users, :owned_closet_hangers_visibility, :integer, :null => false, :default => 1
add_column :users, :wanted_closet_hangers_visibility, :integer, :null => false, :default => 1 add_column :users, :wanted_closet_hangers_visibility, :integer, :null => false, :default => 1

View file

@ -1,4 +1,4 @@
class AddVisibilityToClosetLists < ActiveRecord::Migration[3.2] class AddVisibilityToClosetLists < ActiveRecord::Migration[4.2]
def self.up def self.up
add_column :closet_lists, :visibility, :integer, :null => false, :default => 1 add_column :closet_lists, :visibility, :integer, :null => false, :default => 1
end end

View file

@ -1,4 +1,4 @@
class AddTimestampsToItems < ActiveRecord::Migration[3.2] class AddTimestampsToItems < ActiveRecord::Migration[4.2]
def self.up def self.up
add_timestamps :objects add_timestamps :objects

View file

@ -1,4 +1,4 @@
class AddConversionTimestampsToSwfAssets < ActiveRecord::Migration[3.2] class AddConversionTimestampsToSwfAssets < ActiveRecord::Migration[4.2]
def self.up def self.up
add_column :swf_assets, :reported_broken_at, :timestamp add_column :swf_assets, :reported_broken_at, :timestamp
add_column :swf_assets, :converted_at, :timestamp add_column :swf_assets, :converted_at, :timestamp

View file

@ -1,4 +1,4 @@
class RenameSwfAssetsIdToRemoteId < ActiveRecord::Migration[3.2] class RenameSwfAssetsIdToRemoteId < ActiveRecord::Migration[4.2]
def self.up def self.up
rename_column :swf_assets, :id, :remote_id rename_column :swf_assets, :id, :remote_id
add_column :swf_assets, :id, :primary_key add_column :swf_assets, :id, :primary_key

View file

@ -1,4 +1,4 @@
class AddImageToOutfits < ActiveRecord::Migration[3.2] class AddImageToOutfits < ActiveRecord::Migration[4.2]
def self.up def self.up
add_column :outfits, :image, :string add_column :outfits, :image, :string
end end

View file

@ -1,4 +1,4 @@
class IndexAssociations < ActiveRecord::Migration[3.2] class IndexAssociations < ActiveRecord::Migration[4.2]
def self.up def self.up
add_index :closet_hangers, :item_id add_index :closet_hangers, :item_id
add_index :closet_hangers, :list_id add_index :closet_hangers, :list_id

View file

@ -1,4 +1,4 @@
class IndexClosetHangerQuery < ActiveRecord::Migration[3.2] class IndexClosetHangerQuery < ActiveRecord::Migration[4.2]
def self.up def self.up
# SELECT COUNT(DISTINCT `closet_hangers`.`id`) FROM `closet_hangers` INNER # SELECT COUNT(DISTINCT `closet_hangers`.`id`) FROM `closet_hangers` INNER
# JOIN `users` ON `users`.`id` = `closet_hangers`.`user_id` LEFT OUTER JOIN # JOIN `users` ON `users`.`id` = `closet_hangers`.`user_id` LEFT OUTER JOIN

View file

@ -1,4 +1,4 @@
class IndexClosetHangerQuery2 < ActiveRecord::Migration[3.2] class IndexClosetHangerQuery2 < ActiveRecord::Migration[4.2]
def self.up def self.up
# SELECT `objects`.* FROM `objects` # SELECT `objects`.* FROM `objects`
# INNER JOIN `item_outfit_relationships` ON # INNER JOIN `item_outfit_relationships` ON

View file

@ -1,4 +1,4 @@
class AddFemaleAndMoodAndUnconvertedAndLabeledToPetStates < ActiveRecord::Migration[3.2] class AddFemaleAndMoodAndUnconvertedAndLabeledToPetStates < ActiveRecord::Migration[4.2]
def self.up def self.up
add_column :pet_states, :female, :boolean add_column :pet_states, :female, :boolean
add_column :pet_states, :mood_id, :integer add_column :pet_states, :mood_id, :integer

View file

@ -1,4 +1,4 @@
class AddImageLayersHashToOutfit < ActiveRecord::Migration[3.2] class AddImageLayersHashToOutfit < ActiveRecord::Migration[4.2]
def self.up def self.up
add_column :outfits, :image_layers_hash, :string, :length => 8 add_column :outfits, :image_layers_hash, :string, :length => 8
end end

View file

@ -1,4 +1,4 @@
class AddImageEnqueuedToOutfits < ActiveRecord::Migration[3.2] class AddImageEnqueuedToOutfits < ActiveRecord::Migration[4.2]
def self.up def self.up
add_column :outfits, :image_enqueued, :boolean, :null => false, :default => false add_column :outfits, :image_enqueued, :boolean, :null => false, :default => false
end end

View file

@ -1,4 +1,4 @@
class AddExplicitlyBodySpecificToObjects < ActiveRecord::Migration[3.2] class AddExplicitlyBodySpecificToObjects < ActiveRecord::Migration[4.2]
def self.up def self.up
add_column :objects, :explicitly_body_specific, :boolean, :null => false, :default => false add_column :objects, :explicitly_body_specific, :boolean, :null => false, :default => false
end end

View file

@ -1,4 +1,4 @@
class TranslateItems < ActiveRecord::Migration[3.2] class TranslateItems < ActiveRecord::Migration[4.2]
def self.up def self.up
rename_table :objects, :items rename_table :objects, :items
Item.create_translation_table!({ Item.create_translation_table!({

View file

@ -1,4 +1,4 @@
class CreateSpecies < ActiveRecord::Migration[3.2] class CreateSpecies < ActiveRecord::Migration[4.2]
def self.up def self.up
create_table :species create_table :species
Species.create_translation_table! :name => :string Species.create_translation_table! :name => :string

View file

@ -1,4 +1,4 @@
class CreateColors < ActiveRecord::Migration[3.2] class CreateColors < ActiveRecord::Migration[4.2]
def self.up def self.up
create_table :colors do |t| create_table :colors do |t|
t.boolean :basic t.boolean :basic

View file

@ -1,4 +1,4 @@
class CreateZones < ActiveRecord::Migration[3.2] class CreateZones < ActiveRecord::Migration[4.2]
def self.up def self.up
create_table :zones do |t| create_table :zones do |t|
t.integer :depth t.integer :depth

View file

@ -1,4 +1,4 @@
class RemoveTranslatedFieldsFromItems < ActiveRecord::Migration[3.2] class RemoveTranslatedFieldsFromItems < ActiveRecord::Migration[4.2]
def self.up def self.up
remove_column :items, :name remove_column :items, :name
remove_column :items, :description remove_column :items, :description

View file

@ -1,4 +1,4 @@
class AddGlitchedToPetStates < ActiveRecord::Migration[3.2] class AddGlitchedToPetStates < ActiveRecord::Migration[4.2]
def change def change
add_column :pet_states, :glitched, :boolean, null: false, default: false add_column :pet_states, :glitched, :boolean, null: false, default: false
end end

View file

@ -1,4 +1,4 @@
class AddImageManualToSwfAssets < ActiveRecord::Migration[3.2] class AddImageManualToSwfAssets < ActiveRecord::Migration[4.2]
def change def change
add_column :swf_assets, :image_manual, :boolean, null: false, default: false add_column :swf_assets, :image_manual, :boolean, null: false, default: false
end end

View file

@ -1,4 +1,4 @@
class CreateNeopetsConnections < ActiveRecord::Migration[3.2] class CreateNeopetsConnections < ActiveRecord::Migration[4.2]
def change def change
create_table :neopets_connections do |t| create_table :neopets_connections do |t|
t.integer :user_id t.integer :user_id

View file

@ -1,4 +1,4 @@
class AddContactNeopetsConnectionIdToUsers < ActiveRecord::Migration[3.2] class AddContactNeopetsConnectionIdToUsers < ActiveRecord::Migration[4.2]
def change def change
add_column :users, :contact_neopets_connection_id, :integer add_column :users, :contact_neopets_connection_id, :integer

View file

@ -1,4 +1,4 @@
class AddPrankToColors < ActiveRecord::Migration[3.2] class AddPrankToColors < ActiveRecord::Migration[4.2]
def change def change
add_column :colors, :prank, :boolean, default: false, null: false add_column :colors, :prank, :boolean, default: false, null: false
end end

View file

@ -1,4 +1,4 @@
class AddArtistNeopetsUsernameToPetState < ActiveRecord::Migration[3.2] class AddArtistNeopetsUsernameToPetState < ActiveRecord::Migration[4.2]
def change def change
add_column :pet_states, :artist_neopets_username, :string, null: true add_column :pet_states, :artist_neopets_username, :string, null: true
end end

View file

@ -1,4 +1,4 @@
class CreateWardrobeTips < ActiveRecord::Migration[3.2] class CreateWardrobeTips < ActiveRecord::Migration[4.2]
def up def up
create_table :wardrobe_tips do |t| create_table :wardrobe_tips do |t|
t.integer :index, null: false t.integer :index, null: false

View file

@ -1,4 +1,4 @@
class CreateDonations < ActiveRecord::Migration[3.2] class CreateDonations < ActiveRecord::Migration[4.2]
def change def change
create_table :donations do |t| create_table :donations do |t|
t.integer :amount, null: false t.integer :amount, null: false

View file

@ -1,4 +1,4 @@
class CreateDonationFeatures < ActiveRecord::Migration[3.2] class CreateDonationFeatures < ActiveRecord::Migration[4.2]
def change def change
create_table :donation_features do |t| create_table :donation_features do |t|
t.integer :donation_id, null: false t.integer :donation_id, null: false

View file

@ -1,4 +1,4 @@
class AddEmailToDonations < ActiveRecord::Migration[3.2] class AddEmailToDonations < ActiveRecord::Migration[4.2]
def change def change
add_column :donations, :donor_email, :string add_column :donations, :donor_email, :string
end end

View file

@ -1,4 +1,4 @@
class CreateCampaigns < ActiveRecord::Migration[3.2] class CreateCampaigns < ActiveRecord::Migration[4.2]
def change def change
create_table :campaigns do |t| create_table :campaigns do |t|
t.integer :progress, null: false, default: 0 t.integer :progress, null: false, default: 0

View file

@ -1,4 +1,4 @@
class AddCampaignIdToDonation < ActiveRecord::Migration[3.2] class AddCampaignIdToDonation < ActiveRecord::Migration[4.2]
def change def change
add_column :donations, :campaign_id, :integer, null: false add_column :donations, :campaign_id, :integer, null: false
end end

View file

@ -1,4 +1,4 @@
class AddAdvertisedToCampaign < ActiveRecord::Migration[3.2] class AddAdvertisedToCampaign < ActiveRecord::Migration[4.2]
def change def change
add_column :campaigns, :advertised, :boolean, null: false, default: true add_column :campaigns, :advertised, :boolean, null: false, default: true
end end

View file

@ -1,4 +1,4 @@
class AddDescriptionToCampaigns < ActiveRecord::Migration[3.2] class AddDescriptionToCampaigns < ActiveRecord::Migration[4.2]
def change def change
add_column :campaigns, :description, :text, null: false, default: '' add_column :campaigns, :description, :text, null: false, default: ''
end end

View file

@ -1,4 +1,4 @@
class AddNameToCampaigns < ActiveRecord::Migration[3.2] class AddNameToCampaigns < ActiveRecord::Migration[4.2]
def change def change
# TODO: translations? # TODO: translations?
add_column :campaigns, :name, :string, null: false, default: 'our hosting costs this year' add_column :campaigns, :name, :string, null: false, default: 'our hosting costs this year'

View file

@ -1,4 +1,4 @@
class AddThemeIdToCampaigns < ActiveRecord::Migration[3.2] class AddThemeIdToCampaigns < ActiveRecord::Migration[4.2]
def change def change
add_column :campaigns, :theme_id, :string, null: false, default: 'hug' add_column :campaigns, :theme_id, :string, null: false, default: 'hug'
end end

View file

@ -1,4 +1,4 @@
class AddBasicImageHashToPetTypes < ActiveRecord::Migration[3.2] class AddBasicImageHashToPetTypes < ActiveRecord::Migration[4.2]
def change def change
add_column :pet_types, :basic_image_hash, :string add_column :pet_types, :basic_image_hash, :string
end end

View file

@ -1,4 +1,4 @@
class AddThanksToCampaign < ActiveRecord::Migration[3.2] class AddThanksToCampaign < ActiveRecord::Migration[4.2]
def change def change
add_column :campaigns, :thanks, :text add_column :campaigns, :thanks, :text
end end

View file

@ -1,4 +1,4 @@
class CreateNewsPosts < ActiveRecord::Migration[3.2] class CreateNewsPosts < ActiveRecord::Migration[4.2]
def change def change
create_table :news_posts do |t| create_table :news_posts do |t|
t.text :body t.text :body

View file

@ -1,4 +1,4 @@
class AddPurposeToCampaigns < ActiveRecord::Migration[3.2] class AddPurposeToCampaigns < ActiveRecord::Migration[4.2]
def change def change
# We're using the "name" column as a short campaign purpose phrase. # We're using the "name" column as a short campaign purpose phrase.
# Let's name that "purpose" instead, and create a "name" column that we can # Let's name that "purpose" instead, and create a "name" column that we can

View file

@ -1,4 +1,4 @@
class AddManualSpecialColorIdToItems < ActiveRecord::Migration[3.2] class AddManualSpecialColorIdToItems < ActiveRecord::Migration[4.2]
def change def change
add_column :items, :manual_special_color_id, :integer add_column :items, :manual_special_color_id, :integer
end end

View file

@ -1,4 +1,4 @@
class DropNewsPosts < ActiveRecord::Migration[3.2] class DropNewsPosts < ActiveRecord::Migration[4.2]
def change def change
drop_table :news_posts do |t| drop_table :news_posts do |t|
t.text :body t.text :body

View file

@ -1,4 +1,4 @@
class DropWardrobeTips < ActiveRecord::Migration[3.2] class DropWardrobeTips < ActiveRecord::Migration[4.2]
def change def change
drop_table :wardrobe_tips do |t| drop_table :wardrobe_tips do |t|
t.integer "index", null: false t.integer "index", null: false