Skip to content

Instantly share code, notes, and snippets.

@deepakprasanna
Created January 29, 2015 07:32
Show Gist options
  • Save deepakprasanna/05cb9acb0a1242962110 to your computer and use it in GitHub Desktop.
Save deepakprasanna/05cb9acb0a1242962110 to your computer and use it in GitHub Desktop.
➜ duplii git:(develop) git log
➜ duplii git:(develop) git pull origin develop
From github.com:tarkalabs/duplii
* branch develop -> FETCH_HEAD
Already up-to-date.
➜ duplii git:(develop) rake db:drop
➜ duplii git:(develop) rake db:create
➜ duplii git:(develop) rake db:migrate
== 20141013103158 DeviseCreateUsers: migrating ================================
-- create_table(:users)
-> 0.0141s
-- add_index(:users, :email, {:unique=>true})
-> 0.0026s
-- add_index(:users, :reset_password_token, {:unique=>true})
-> 0.0019s
-- add_index(:users, :confirmation_token, {:unique=>true})
-> 0.0020s
== 20141013103158 DeviseCreateUsers: migrated (0.0210s) =======================
== 20141015091821 CreateAddresses: migrating ==================================
-- create_table(:addresses)
-> 0.0094s
== 20141015091821 CreateAddresses: migrated (0.0094s) =========================
== 20141015092330 CreateCities: migrating =====================================
-- create_table(:cities)
-> 0.0056s
== 20141015092330 CreateCities: migrated (0.0057s) ============================
== 20141015092342 CreateCountries: migrating ==================================
-- create_table(:countries)
-> 0.0031s
== 20141015092342 CreateCountries: migrated (0.0032s) =========================
== 20141015092457 CreateCompanies: migrating ==================================
-- create_table(:companies)
-> 0.0022s
== 20141015092457 CreateCompanies: migrated (0.0023s) =========================
== 20141015093346 CreateProfiles: migrating ===================================
-- create_table(:profiles)
-> 0.0144s
== 20141015093346 CreateProfiles: migrated (0.0145s) ==========================
== 20141015094417 CreateLanguages: migrating ==================================
-- create_table(:languages)
-> 0.0065s
== 20141015094417 CreateLanguages: migrated (0.0067s) =========================
== 20141016112049 CreateLeads: migrating ======================================
-- create_table(:leads)
-> 0.0082s
== 20141016112049 CreateLeads: migrated (0.0083s) =============================
== 20141106134108 RenameColumnInUsersTable: migrating =========================
-- rename_column(:users, :sponser_id, :sponsor_id)
-> 0.0068s
== 20141106134108 RenameColumnInUsersTable: migrated (0.0069s) ================
== 20141107101142 AddColumnsInAddressesTable: migrating =======================
-- change_table(:addresses)
-> 0.0096s
== 20141107101142 AddColumnsInAddressesTable: migrated (0.0098s) ==============
== 20141107172755 RemoveAddressColumnInProfileTable: migrating ================
-- index_exists?(:profiles, :address_id)
-> 0.0030s
-- remove_index(:profiles, :address_id)
-> 0.0019s
-- remove_column(:profiles, :address_id)
-> 0.0005s
== 20141107172755 RemoveAddressColumnInProfileTable: migrated (0.0057s) =======
== 20141107182027 RemoveAddressColumnInLeadTable: migrating ===================
-- index_exists?(:leads, :address_id)
-> 0.0023s
-- remove_index(:leads, :address_id)
-> 0.0019s
-- remove_column(:leads, :address_id)
-> 0.0005s
== 20141107182027 RemoveAddressColumnInLeadTable: migrated (0.0051s) ==========
== 20141108164725 ChangeCityCountryDataTypeInAddressesTable: migrating ========
-- add_column(:addresses, :city, :string)
-> 0.0008s
-- add_column(:addresses, :country, :string)
-> 0.0005s
-- remove_reference(:addresses, :city)
-> 0.0006s
-- remove_reference(:addresses, :country)
-> 0.0004s
== 20141108164725 ChangeCityCountryDataTypeInAddressesTable: migrated (0.0025s)
== 20141112113101 AddAvatarToLeads: migrating =================================
-- add_column(:leads, :avatar, :string)
-> 0.0007s
== 20141112113101 AddAvatarToLeads: migrated (0.0008s) ========================
== 20141117125007 AddColumnsToCountry: migrating ==============================
-- change_table(:countries)
-> 0.0065s
== 20141117125007 AddColumnsToCountry: migrated (0.0066s) =====================
== 20141117130320 AddTableStates: migrating ===================================
-- create_table(:states)
-> 0.0022s
== 20141117130320 AddTableStates: migrated (0.0022s) ==========================
== 20141117130547 AddColumnsToCities: migrating ===============================
-- change_table(:cities)
-> 0.0069s
== 20141117130547 AddColumnsToCities: migrated (0.0071s) ======================
== 20141118055525 ChangeCodeLimitInCities: migrating ==========================
-- change_column(:cities, :code, :string, {:limit=>4})
-> 0.0006s
== 20141118055525 ChangeCodeLimitInCities: migrated (0.0007s) =================
== 20141119173055 CreateIndustryStandards: migrating ==========================
-- create_table(:industry_standards)
-> 0.0073s
== 20141119173055 CreateIndustryStandards: migrated (0.0074s) =================
== 20141120034536 AddTimePeriodToIndustryStandards: migrating =================
-- add_column(:industry_standards, :time_period, :string)
-> 0.0036s
== 20141120034536 AddTimePeriodToIndustryStandards: migrated (0.0037s) ========
== 20141120060918 FixColumnName: migrating ====================================
-- rename_column(:industry_standards, :activity, :category)
-> 0.0018s
== 20141120060918 FixColumnName: migrated (0.0019s) ===========================
== 20141121125753 CreatePricingPlans: migrating ===============================
-- create_table(:pricing_plans)
-> 0.0090s
== 20141121125753 CreatePricingPlans: migrated (0.0095s) ======================
== 20141121130007 CreateSubscriptions: migrating ==============================
-- create_table(:subscriptions)
-> 0.0034s
== 20141121130007 CreateSubscriptions: migrated (0.0034s) =====================
== 20141121130134 CreatePayments: migrating ===================================
-- create_table(:payments)
-> 0.0089s
== 20141121130134 CreatePayments: migrated (0.0090s) ==========================
== 20141127051811 RenameLanguagesTable: migrating =============================
-- rename_table(:languages, :locales)
-> 0.0034s
-- add_column(:locales, :code, :string)
-> 0.0016s
== 20141127051811 RenameLanguagesTable: migrated (0.0051s) ====================
== 20141127062424 AddLocaleToUsers: migrating =================================
-- add_column(:users, :locale, :string)
-> 0.0009s
== 20141127062424 AddLocaleToUsers: migrated (0.0009s) ========================
== 20141201141252 AddAboutMeColumnToProfilesTable: migrating ==================
-- change_table(:profiles)
-> 0.0011s
== 20141201141252 AddAboutMeColumnToProfilesTable: migrated (0.0013s) =========
== 20141203044552 AddAvatarToProfile: migrating ===============================
-- add_column(:profiles, :avatar, :string)
-> 0.0007s
== 20141203044552 AddAvatarToProfile: migrated (0.0008s) ======================
== 20141203081200 ChangeCompanyInProfiles: migrating ==========================
-- add_column(:profiles, :company, :string)
-> 0.0006s
-- remove_reference(:profiles, :company)
-> 0.0007s
== 20141203081200 ChangeCompanyInProfiles: migrated (0.0014s) =================
== 20141204055446 RemoveLanguageFromProfiles: migrating =======================
-- add_reference(:profiles, :locale)
-> 0.0005s
-- remove_reference(:profiles, :language)
-> 0.0004s
== 20141204055446 RemoveLanguageFromProfiles: migrated (0.0010s) ==============
== 20141205090153 CreatePositions: migrating ==================================
-- create_table(:positions)
-> 0.0074s
== 20141205090153 CreatePositions: migrated (0.0075s) =========================
== 20141207153455 AddUnverifiedMobileNumberAndCodeColumnsToProfiles: migrating
-- add_column(:profiles, :unverified_mobile_number, :string)
-> 0.0009s
-- add_column(:profiles, :verification_code, :string)
-> 0.0006s
== 20141207153455 AddUnverifiedMobileNumberAndCodeColumnsToProfiles: migrated (0.0016s)
== 20150108051620 AddPositionsToProfiles: migrating ===========================
-- add_reference(:profiles, :position, {:index=>true})
-> 0.0032s
== 20150108051620 AddPositionsToProfiles: migrated (0.0033s) ==================
== 20150108053622 AddMarketTypeToUsers: migrating =============================
-- add_column(:users, :market_type, :string)
-> 0.0026s
== 20150108053622 AddMarketTypeToUsers: migrated (0.0028s) ====================
== 20150110025523 AddWizardStepToUsers: migrating =============================
-- add_column(:users, :wizard_step, :string)
-> 0.0026s
== 20150110025523 AddWizardStepToUsers: migrated (0.0027s) ====================
== 20150112100532 CreateMeetings: migrating ===================================
-- create_table(:meetings)
-> 0.0033s
== 20150112100532 CreateMeetings: migrated (0.0034s) ==========================
== 20150125153156 ChangeCompanyTypeInPositions: migrating =====================
-- remove_column(:positions, :company)
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
PG::UndefinedColumn: ERROR: column "company" of relation "positions" does not exist
: ALTER TABLE "positions" DROP "company"/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/postgresql/database_statements.rb:128:in `async_exec'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/postgresql/database_statements.rb:128:in `block in execute'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract_adapter.rb:373:in `block in log'
/Users/deepak/Workspace/duplii/.gems/gems/activesupport-4.1.5/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract_adapter.rb:367:in `log'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/postgresql/database_statements.rb:127:in `execute'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/schema_statements.rb:397:in `remove_column'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:649:in `block in method_missing'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:621:in `block in say_with_time'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:621:in `say_with_time'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:641:in `method_missing'
/Users/deepak/Workspace/duplii/db/migrate/20150125153156_change_company_type_in_positions.rb:3:in `change'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:595:in `exec_migration'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:579:in `block (2 levels) in migrate'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:578:in `block in migrate'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:294:in `with_connection'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:577:in `migrate'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:752:in `migrate'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:992:in `block in execute_migration_in_transaction'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:1038:in `block in ddl_transaction'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `block in transaction'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/database_statements.rb:209:in `within_new_transaction'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `transaction'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/transactions.rb:208:in `transaction'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:1038:in `ddl_transaction'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:991:in `execute_migration_in_transaction'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:953:in `block in migrate'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:949:in `each'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:949:in `migrate'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:807:in `up'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:785:in `migrate'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/railties/databases.rake:34:in `block (2 levels) in <top (required)>'
ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR: column "company" of relation "positions" does not exist
: ALTER TABLE "positions" DROP "company"
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/postgresql/database_statements.rb:128:in `async_exec'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/postgresql/database_statements.rb:128:in `block in execute'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract_adapter.rb:373:in `block in log'
/Users/deepak/Workspace/duplii/.gems/gems/activesupport-4.1.5/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract_adapter.rb:367:in `log'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/postgresql/database_statements.rb:127:in `execute'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/schema_statements.rb:397:in `remove_column'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:649:in `block in method_missing'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:621:in `block in say_with_time'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:621:in `say_with_time'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:641:in `method_missing'
/Users/deepak/Workspace/duplii/db/migrate/20150125153156_change_company_type_in_positions.rb:3:in `change'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:595:in `exec_migration'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:579:in `block (2 levels) in migrate'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:578:in `block in migrate'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:294:in `with_connection'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:577:in `migrate'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:752:in `migrate'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:992:in `block in execute_migration_in_transaction'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:1038:in `block in ddl_transaction'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `block in transaction'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/database_statements.rb:209:in `within_new_transaction'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `transaction'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/transactions.rb:208:in `transaction'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:1038:in `ddl_transaction'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:991:in `execute_migration_in_transaction'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:953:in `block in migrate'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:949:in `each'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:949:in `migrate'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:807:in `up'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:785:in `migrate'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/railties/databases.rake:34:in `block (2 levels) in <top (required)>'
PG::UndefinedColumn: ERROR: column "company" of relation "positions" does not exist
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/postgresql/database_statements.rb:128:in `async_exec'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/postgresql/database_statements.rb:128:in `block in execute'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract_adapter.rb:373:in `block in log'
/Users/deepak/Workspace/duplii/.gems/gems/activesupport-4.1.5/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract_adapter.rb:367:in `log'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/postgresql/database_statements.rb:127:in `execute'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/schema_statements.rb:397:in `remove_column'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:649:in `block in method_missing'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:621:in `block in say_with_time'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:621:in `say_with_time'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:641:in `method_missing'
/Users/deepak/Workspace/duplii/db/migrate/20150125153156_change_company_type_in_positions.rb:3:in `change'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:595:in `exec_migration'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:579:in `block (2 levels) in migrate'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:578:in `block in migrate'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:294:in `with_connection'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:577:in `migrate'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:752:in `migrate'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:992:in `block in execute_migration_in_transaction'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:1038:in `block in ddl_transaction'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `block in transaction'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/database_statements.rb:209:in `within_new_transaction'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `transaction'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/transactions.rb:208:in `transaction'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:1038:in `ddl_transaction'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:991:in `execute_migration_in_transaction'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:953:in `block in migrate'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:949:in `each'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:949:in `migrate'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:807:in `up'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:785:in `migrate'
/Users/deepak/Workspace/duplii/.gems/gems/activerecord-4.1.5/lib/active_record/railties/databases.rake:34:in `block (2 levels) in <top (required)>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment