38 Commits

Author SHA1 Message Date
Christopher Allan Webber
9a9bafc078 Reverting "Always activate testing in every test module ever."
Revert "Always activate testing in every test module ever."

This reverts commit 0536306048daa0970d2e43411ba2a9bf073e570e.
2013-05-17 11:12:56 -05:00
Christopher Allan Webber
0536306048 Always activate testing in every test module ever.
Kind of a dorky way to implement this, but...
2013-05-16 17:51:21 -05:00
Elrond
c130e3ee79 Move db.sql.migration_tools to db.migration_tools.
Follow the new trend.
2013-01-08 22:50:01 +01:00
Elrond
a050e776c6 Move all the migration tools into new migration_tools.py
Factor all the migration related stuff out into a new
.db.sql.migration_tools.
First we don't have to load this module for our normal
server.
Second it makes all the import dependencies a little more
cleaner.
2013-01-08 22:50:01 +01:00
Sebastian Spaeth
39dc3bf8db Mv db.sql.base to db.base
This concludes the db.sql.* -> db.* move. Our db abstraction layer is
sqlalchemy, so there is no need to a separate db.sql.* hierarchy.

All tests have been run for each of the commit series to make sure
everything works at every step.
2013-01-07 13:42:32 +01:00
Sebastian Spaeth
1e46dc2537 Move db.sql.util to db.util
Now that sqlalchemy is providing the database abstractions, there is no
need to hide everything in db.sql. sub-modules. It complicates the code
and provides a futher layer of indirection.

Move the db.sql.util.py to db.util.py and adapt the importers.
2013-01-07 11:31:56 +01:00
Christopher Allan Webber
52539acad2 Add a UniqueConstraint add test in test_sql_migrations
We should have this anyway, and Elrond needs it to help fix current
broken migration thingies.
2012-12-05 16:14:50 -06:00
Christopher Allan Webber
35a24fc263 Moving the "dependency injection printer tools" over to tools/common.py 2012-07-14 12:55:14 -05:00
Brett Smith
c7dfd4fba6 Level exits are Unicode too. 2012-07-04 11:09:36 -04:00
Brett Smith
a00ac32045 Make sure MigrationManagers always get Unicode names.
If we fail to do this, SQLAlchemy complains that we're binding a
non-Unicode value to a Unicode column.
2012-07-04 10:54:44 -04:00
Christopher Allan Webber
d2506eebb4 Commenting out the migrations that don't exist yet 2012-02-18 23:19:41 -06:00
Christopher Allan Webber
7f3ec607a3 Explained why migration #1 commented out. 2012-01-29 22:19:53 -06:00
Christopher Allan Webber
78d17b8055 Excepting that migration 1 doesn't work(!), sqlalchemy migration branch working
The reason migration 1 doesn't work, and is commented out, is because
of sqlalchemy-migrate not handling certain constraints while dropping
binary sqlite columns right.  See also:
http://code.google.com/p/sqlalchemy-migrate/issues/detail?id=143&thanks=143&ts=1327882242
2012-01-29 22:19:03 -06:00
Christopher Allan Webber
e920b96859 db_conn.engine -> db_conn.bind 2012-01-29 17:28:25 -06:00
Christopher Allan Webber
be1077ac44 Migration manager's current migration should be 3, not 7, after running all migrations! 2012-01-29 17:23:27 -06:00
Christopher Allan Webber
505c0db119 Fixed the descriptions for the necroplex! 2012-01-29 17:22:29 -06:00
Christopher Allan Webber
c7fa585bff assert column type from Unicode -> VARCHAR. SQLAlchemy reflection only so smart ;) 2012-01-29 17:21:44 -06:00
Christopher Allan Webber
ecb4cc8990 printer = CollectingPrinter -> printer = CollectingPrinter() 2012-01-29 17:11:41 -06:00
Christopher Allan Webber
245e6d83a6 CollectingPrinter is a class, not a function! 2012-01-29 17:10:18 -06:00
Christopher Allan Webber
0f3526c601 magical_powers relationship set on wrong table, fixed 2012-01-29 16:48:44 -06:00
Christopher Allan Webber
a5e03db6c2 Migration records are dicts, not lists. Fix SET1_MIGATIONS! 2012-01-29 16:39:08 -06:00
Christopher Allan Webber
e8e52b3a0b test_set1_to_set3() now has appropriate amount of code, even if it doesn't run :) 2012-01-29 16:33:47 -06:00
Christopher Allan Webber
caed154af0 Fixing some obvious errors caught by pyflakes 2012-01-29 16:33:47 -06:00
Christopher Allan Webber
5de0f4daf5 More stuff even yet per sql migration stuff! And still not ready! 2012-01-29 16:33:47 -06:00
Christopher Allan Webber
690b51faa7 Closer to the end of this migration test... 2012-01-29 16:33:47 -06:00
Christopher Allan Webber
94eff10deb unicode stuff and more bits on the actual migration method 2012-01-29 16:33:47 -06:00
Christopher Allan Webber
40f0996ab9 A ton more work on the SQL migration unit tests... 2012-01-29 16:33:46 -06:00
Christopher Allan Webber
09e2c48701 Wrote up some scaffolding for the actual tests 2012-01-29 16:33:46 -06:00
Christopher Allan Webber
dc3db4681f Insert migration objects round 3 2012-01-29 16:33:46 -06:00
Christopher Allan Webber
d6cdf64b4f Wrote some (semi-silly) descriptions of each migration 2012-01-29 16:33:46 -06:00
Christopher Allan Webber
356654deb8 Docstrings for stage 2 migrations 2012-01-29 16:33:46 -06:00
Christopher Allan Webber
d74a9483de Theoretical full set of migration2 objects to insert for testing 2012-01-29 16:33:46 -06:00
Christopher Allan Webber
64d280647c Insert migration1 objects. Also, Level1 id from Integer->Unicode 2012-01-29 16:33:46 -06:00
Christopher Allan Webber
248b5061ec All theoretical migrations written! 2012-01-29 16:33:46 -06:00
Christopher Allan Webber
473e06053c binding migration metadata to engine, and level_exits_new_table should now work 2012-01-29 16:33:46 -06:00
Christopher Allan Webber
89694d6d69 More test migration work. Closing to working migrations for set 2...
Also, this file is written in 2012, correct that ;)
2012-01-29 16:33:46 -06:00
Christopher Allan Webber
129c36be6f Might as well call it "set2 migrations" 2012-01-29 16:33:46 -06:00
Christopher Allan Webber
0f10058fd3 A theoretical set of models to migrate about with, plus one migration ;) 2012-01-29 16:33:46 -06:00