I am currently writing a flash application using peeweeorm for postgresql. This worked fine in the past, but it seems like something was confused, and I don’t understand how to proceed with debugging the problem.
First, I start the database as follows:
/usr/local/pgsql/bin/psql -D /usr/local/pgsql/data
I am creating a new database:
/usr/local/pgsql/bin/createdb indico
configure the connection as follows:
db = peewee.PostgresqlDatabase(
'indico',
host="/tmp/",
user = 'indico',
password = 'password',
)
Create the necessary tables:
class PostgresqlModel(peewee.Model):
"""A base model that will use our Postgresql database"""
_id = peewee.PrimaryKeyField()
class Meta:
database = db
PostgresqlModel.create_table()
But then when I try to access the created tables:
/usr/local/pgsql/bin/psql -d indico -U indico
>>> \dt
no relations found
Nothing seems to be visible. If I try to create them again, I get an error message that already exists, and while I can save the objects, I cannot load them.
, - , , , . , - , .