Reputation: 3100
I have a program communicating with a mysql database, which I should avoid to modify it until everything works fine.
So I already have a way to create a fake in-memory database (using sqlalchemy+sqlite), but the problem is that I have to create the schema and populate the database all the time.
As for example
Table(
'builddefinitions', meta,
Column('idBuildDefinitions', String(20)),
Column('BuildType', String(20)),
)
Is it possible instead to
Is there a way to do this is sqlalchemy?
Upvotes: 0
Views: 1474
Reputation: 4128
I would clone the database. This is why one usually has a production environment and a separate development environment (and in some cases testing and pre-production).
Upvotes: 1
Reputation: 4987
You do not have an straight way to do it. Take a look at this dumper: http://www.tylerlesmann.com/2009/apr/27/copying-databases-across-platforms-sqlalchemy/
I don't know how to maintain both updated, if it is what you want.
Upvotes: 1