Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

doesn't work with rails #1

Closed
chapati23 opened this Issue Jun 29, 2012 · 3 comments

Comments

Projects
None yet
2 participants

i set up a clean rails database (running postgres 9.1.4, installed with homebrew).

here's what i tried:

rake db:drop:all
rake db:create:all
rake db:migrate
heroku pg:transfer --from white

Here's the trace i got:

Source database: HEROKU_POSTGRESQL_WHITE on myapp.herokuapp.com
Target database: myapp_development on localhost:5432

 !    WARNING: Destructive Action
 !    This command will affect the app: myapp
 !    To proceed, type "myapp" or re-run this command with --confirm myapp

> myapp
pg_dump: reading schemas
pg_dump: reading user-defined tables
pg_dump: reading extensions
pg_dump: reading user-defined functions
pg_dump: reading user-defined types
pg_dump: reading procedural languages
pg_dump: reading user-defined aggregate functions
pg_dump: reading user-defined operators
pg_dump: reading user-defined operator classes
pg_dump: reading user-defined operator families
pg_dump: reading user-defined text search parsers
pg_dump: reading user-defined text search templates
pg_dump: reading user-defined text search dictionaries
pg_dump: reading user-defined text search configurations
pg_dump: reading user-defined foreign-data wrappers
pg_dump: reading user-defined foreign servers
pg_dump: reading default privileges
pg_dump: reading user-defined collations
pg_dump: reading user-defined conversions
pg_dump: reading type casts
pg_dump: reading table inheritance information
pg_dump: reading rewrite rules
pg_dump: finding extension members
pg_dump: finding inheritance relationships
pg_dump: reading column info for interesting tables
pg_dump: flagging inherited columns in subtables
pg_dump: reading indexes
pg_dump: reading constraints
pg_dump: reading triggers
pg_dump: reading large objects
pg_dump: reading dependency data
pg_dump: saving encoding = UTF8
pg_dump: saving standard_conforming_strings = off
pg_dump: saving database definition
pg_restore: connecting to database for restore
pg_restore: dropping COMMENT EXTENSION plpgsql
pg_restore: dropping EXTENSION plpgsql
pg_restore: dropping COMMENT SCHEMA public
pg_restore: dropping SCHEMA public
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 6; 2615 2200 SCHEMA public vyhguhrsemgkst
pg_restore: [archiver (db)] could not execute query: ERROR:  cannot drop schema public because other objects depend on it
DETAIL:  table schema_migrations depends on schema public
table posts depends on schema public
table users depends on schema public
table fans depends on schema public
HINT:  Use DROP ... CASCADE to drop the dependent objects too.
    Command was: DROP SCHEMA public;

pg_restore: creating SCHEMA public
pg_restore: [archiver (db)] could not execute query: ERROR:  schema "public" already exists
    Command was: CREATE SCHEMA public;



pg_restore: creating COMMENT SCHEMA public
pg_restore: creating EXTENSION plpgsql
pg_restore: creating COMMENT EXTENSION plpgsql
pg_restore: setting owner and privileges for SCHEMA public
pg_restore: setting owner and privileges for COMMENT SCHEMA public
pg_restore: setting owner and privileges for EXTENSION plpgsql
pg_restore: setting owner and privileges for COMMENT EXTENSION plpgsql
WARNING: errors ignored on restore: 2
Owner

ddollar commented Jun 29, 2012

It seems like that error might be just around the public schema. Do you actually end up with a proper database locally after running the command?

yup (as far as i can tell)

here's the trace from rake db:migrate:reset:

==  CreatePosts: migrating ====================================================
-- create_table(:posts)
NOTICE:  CREATE TABLE will create implicit sequence "posts_id_seq" for serial column "posts.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "posts_pkey" for table "posts"
   -> 0.0040s
==  CreatePosts: migrated (0.0044s) ===========================================

==  DeviseCreateUsers: migrating ==============================================
-- create_table(:users)
NOTICE:  CREATE TABLE will create implicit sequence "users_id_seq" for serial column "users.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "users_pkey" for table "users"
   -> 0.0074s
-- add_index(:users, :email, {:unique=>true})
   -> 0.0238s
-- add_index(:users, :reset_password_token, {:unique=>true})
   -> 0.0024s
==  DeviseCreateUsers: migrated (0.0339s) =====================================

==  CreateFans: migrating =====================================================
-- create_table(:fans)
NOTICE:  CREATE TABLE will create implicit sequence "fans_id_seq" for serial column "fans.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "fans_pkey" for table "fans"
   -> 0.0024s
==  CreateFans: migrated (0.0025s) ============================================
Owner

ddollar commented Nov 7, 2014

Hello. I apologize for the delayed response. I am currently declaring issue bankruptcy. If this issue still applies to you please feel free to re-open and explain. Thanks :)

@ddollar ddollar closed this Nov 7, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment