Skip to content

Instantly share code, notes, and snippets.

@captproton
Created September 26, 2010 01:46
Show Gist options
  • Select an option

  • Save captproton/597492 to your computer and use it in GitHub Desktop.

Select an option

Save captproton/597492 to your computer and use it in GitHub Desktop.
$ rake db:migrate --trace
(in /Users/heathertanner/Sites/rainforest2blossom)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
== CreateStructureForPortfolio: migrating ====================================
-- create_table(:images_portfolio_entries, {:force=>true, :id=>false})
-> 0.1361s
-- add_index(:images_portfolio_entries, [:image_id, :portfolio_entry_id], {:unique=>false, :name=>"composite_key_index"})
-> 0.0007s
-- create_table(:portfolio_entries, {:force=>true})
-> 0.0024s
-- add_index(:portfolio_entries, :id)
-> 0.0009s
-- add_index(:portfolio_entries, :parent_id)
-> 0.0009s
-- add_index(:portfolio_entries, :lft)
-> 0.0013s
-- add_index(:portfolio_entries, :rgt)
-> 0.0012s
rake aborted!
An error has occurred, this and all later migrations canceled:
SQLite3::ConstraintException: columns user_id, name are not unique: INSERT INTO "user_plugins" ("name", "position", "user_id") VALUES ('portfolio', 8, 1)
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/connection_adapters/abstract_adapter.rb:202:in `log'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/connection_adapters/sqlite_adapter.rb:135:in `execute'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/connection_adapters/abstract/database_statements.rb:263:in `insert_sql'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/connection_adapters/sqlite_adapter.rb:149:in `insert_sql'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/connection_adapters/abstract/database_statements.rb:44:in `insert'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/connection_adapters/abstract/query_cache.rb:16:in `insert'
/opt/local/lib/ruby/gems/1.8/gems/arel-1.0.1/lib/arel/engines/sql/engine.rb:30:in `create'
/opt/local/lib/ruby/gems/1.8/gems/arel-1.0.1/lib/arel/algebra/relations/writes.rb:24:in `call'
/opt/local/lib/ruby/gems/1.8/gems/arel-1.0.1/lib/arel/session.rb:17:in `create'
/opt/local/lib/ruby/gems/1.8/gems/arel-1.0.1/lib/arel/algebra/relations/relation.rb:159:in `insert'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/relation.rb:14:in `__send__'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/relation.rb:14:in `insert'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/persistence.rb:271:in `create'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/timestamp.rb:47:in `create'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/callbacks.rb:281:in `create'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/callbacks.rb:413:in `_run_create_callbacks'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/callbacks.rb:281:in `create'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/persistence.rb:247:in `create_or_update'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/callbacks.rb:277:in `create_or_update'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/callbacks.rb:418:in `_run_save_callbacks'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/callbacks.rb:277:in `create_or_update'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/persistence.rb:39:in `save'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/validations.rb:43:in `save'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/attribute_methods/dirty.rb:21:in `save'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/transactions.rb:237:in `save'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/transactions.rb:289:in `with_transaction_returning_status'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/connection_adapters/abstract/database_statements.rb:139:in `transaction'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/transactions.rb:204:in `transaction'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/transactions.rb:287:in `with_transaction_returning_status'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/transactions.rb:237:in `save'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/transactions.rb:248:in `rollback_active_record_state!'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/transactions.rb:236:in `save'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/associations/association_collection.rb:271:in `create'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/associations/association_collection.rb:504:in `create_record'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/associations/association_collection.rb:479:in `add_record_to_target_with_callbacks'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/associations/association_collection.rb:504:in `create_record'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/associations/association_collection.rb:269:in `create'
/Users/heathertanner/Sites/rainforest2blossom/db/seeds/portfolio.rb:2
/Users/heathertanner/Sites/rainforest2blossom/db/seeds/portfolio.rb:1:in `each'
/Users/heathertanner/Sites/rainforest2blossom/db/seeds/portfolio.rb:1
/opt/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:235:in `load'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:235:in `load'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:225:in `load_dependency'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:591:in `new_constants_in'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:225:in `load_dependency'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:235:in `load'
/Users/heathertanner/Sites/rainforest2blossom/db/migrate/20100924214952_create_structure_for_portfolio.rb:28:in `up_without_benchmarks'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/migration.rb:312:in `send'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/migration.rb:312:in `migrate'
/opt/local/lib/ruby/1.8/benchmark.rb:293:in `measure'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/migration.rb:312:in `migrate'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/migration.rb:395:in `__send__'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/migration.rb:395:in `migrate'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/migration.rb:537:in `migrate'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/migration.rb:611:in `call'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/migration.rb:611:in `ddl_transaction'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/connection_adapters/abstract/database_statements.rb:139:in `transaction'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/transactions.rb:204:in `transaction'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/migration.rb:611:in `ddl_transaction'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/migration.rb:536:in `migrate'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/migration.rb:523:in `each'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/migration.rb:523:in `migrate'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/migration.rb:433:in `up'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/migration.rb:415:in `migrate'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/railties/databases.rake:142
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/opt/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/opt/local/bin/rake:19:in `load'
/opt/local/bin/rake:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment