I am trying to rebuild my development database from bare metal and am getting a strange error that I've not seen before. I cant seem to track down the cause. Here are the commands I am running and the results:
rake db:drop
rake db:create
rake db:migrate:status
Schema migrations table does not exist yet.
rake db:migrate
== CreateUser: migrating =====================================================
-- create_table(:user)
-> 0.0264s
== CreateUser: migrated (0.0267s) ============================================
rake aborted!
An error has occurred, this and all later migrations canceled:
PG::NotNullViolation: ERROR: null value in column "version" violates not-null constraint
DETAIL: Failing row contains (null).
: INSERT INTO "schema_migrations" DEFAULT VALUES
/home/xxx/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-4.0.3/lib/active_record/connection_adapters/postgresql_adapter.rb:774:in `async_exec'
I am fairly certain I have not modified the user migration file since last time I successfully migrated it. Have any of you seen this error before and resolved it?
versionof yourschematable... -- also, do you know what isDEFAULT VALUES? - MrYoshijitimestamp_migration_name.rb). I bet your migration file name starts with_. - fotanus