-Original Message-
From: sqlalchemy@googlegroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Chris Withers
Sent: 13 February 2008 13:51
To: sqlalchemy@googlegroups.com
Subject: [sqlalchemy] Re: schema changes
Michael Bayer wrote:
What if they exist but don't match the spec
Michael Bayer wrote:
What if they exist but don't match the spec that SA has created?
just try it out...create_all() by default checks the system tables for
the presence of a table first before attempting to create it
Cool,
(same
with dropping).
When would SA drop a table?
On Wednesday 13 February 2008 22:06:54 Don Dwiggins wrote:
[EMAIL PROTECTED] wrote:
we've put such a notion in our db, so the db knows what
model-version it matches. Then, at start, depending on the
versions one can decide which migration script to execute (if the
db should be made to
[EMAIL PROTECTED] wrote:
This is getting into a big area: the problem of version
control/configuration management for databases
its not any bigger than any other configuration management of
something structured that is deployed in the field... as long it
consists of pieces and these pieces
Hi,
...and what happens if these methods are called and the tables already
exist?
With metadata.create_all, it only creates ones that don't exist.
table.create() will error, or if you use the checkfirst option, will do
nothing.
What if they exist but don't match the spec that SA has
Paul Johnston wrote:
SA will only try to create table when you tell it - either table.create() or
metadata.create_all()
...and what happens if these methods are called and the tables already
exist?
What if they exist but don't match the spec that SA has created?
cheers,
Chris
--
On Feb 12, 2008, at 12:34 PM, Chris Withers wrote:
Paul Johnston wrote:
SA will only try to create table when you tell it - either
table.create() or
metadata.create_all()
...and what happens if these methods are called and the tables already
exist?
What if they exist but don't match
Hi Chris,
What happens when the schema expected by the mappers doesn't match up to
the schema in the database?
If the SQLAlchemy table definitions don't match the database, you will
usually get SQL errors when you try to use them.
The TurboGears admin tool can tell you the differences between