[freeside-users] freeside-setup failure: Unknown table

Jordan Webb jordanwebb at dna-communications.com
Thu Oct 26 16:19:22 PDT 2006


> > > | ...and finally, it dies like this:
> > > | 
> > > | Unknown table cust_main_county at
> > 
> > This is unexpected - it is trying to insert the initial data 
> > in the tables 
> > and dying.  Are the tables actually created in the db?  Are 
> there any 
> > other errors before this besides the NOTICEs about indices?
> 
> No, the tables don't actually get created.  There is nothing in my
> database.  There are no other messages; I only get NOTICEs about
> implicit sequences and indexes, and finally the Unknown table message.

I think I found the problem.  I had created a schema in the database
called 'freeside' which the freeside user was defaulting to, so when
freeside-setup went and created its tables, that's where they ended up.
But DBIx::DBSchema::DBD::Pg appears to be hardcoded to look in the
'public' schema, so when the script went to read and reverse-engineer
the created tables, it was coming up with nothing.  Dropping the
'freeside' schema or hacking DBIx::DBSchema::DBD::Pg::default_db_schema
to return 'freeside' instead of 'public' lets the script complete
without problems.

I wanted to stick Freeside into its own schema because I was planning to
integrate various other bits and pieces of systems we have around with
it, and according to my reading, PostgreSQL doesn't support working
across databases within the same connection.  My plan was to stick
everything in the same database, under different schemas.  Is keeping
the Freeside tables in any other schema aside from 'public' supported?
Is there a cleaner way of changing default_db_schema thank hacking the
module (didn't look like there was)?

--
Jordan  


More information about the freeside-users mailing list