1696 Commits

Author SHA1 Message Date
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
780fdd7bd6 import changeset into sql models 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
Christopher Allan Webber
cfbbdcc5ad Another db->db.engine because I'm bad at things ;)
Thanks again Elrond.
2012-01-29 16:33:45 -06:00
Christopher Allan Webber
3f2c6f96c1 No need for self here (thanks again Elrond ;)) 2012-01-29 16:33:45 -06:00
Christopher Allan Webber
dc5da0f891 Another MigrationManager fix.
self.database -> self.database.engine (thanks again Elrond for the catch)
2012-01-29 16:33:45 -06:00
Christopher Allan Webber
bf81382896 Make name the primary key in migration records 2012-01-29 16:33:45 -06:00
Christopher Allan Webber
cbf29f2d58 assert was positive when it should be negative, fixed 2012-01-29 16:33:45 -06:00
Christopher Allan Webber
851df6214e Use .first() instead of [0]... thanks elrond :) 2012-01-29 16:33:45 -06:00
Christopher Allan Webber
23f4c6b2fd We should probably add that object to the DB also :P 2012-01-29 16:33:45 -06:00
Christopher Allan Webber
09dcc34c95 Commit that new migration record ;) 2012-01-29 16:33:45 -06:00
Christopher Allan Webber
b0ec21bff3 Add create_new_migration_record method to MigrationManager 2012-01-29 16:33:45 -06:00
Christopher Allan Webber
8bf3f63af1 Added init_tables method to MigrationManager 2012-01-29 16:33:45 -06:00
Christopher Allan Webber
3635ccdf34 More work on SQL MigrationManager
Added methods:
 - migration_data
 - database_current_migration
 - migrations_to_run
2012-01-29 16:33:45 -06:00
Christopher Allan Webber
4c86905789 Removing printer argument now that we use self.printer 2012-01-29 16:33:45 -06:00
Christopher Allan Webber
a315962f0d Finishing the init_or_migrate function 2012-01-29 16:33:45 -06:00
Christopher Allan Webber
705689b96f More work on migration manager, including adding a dry run function 2012-01-29 16:33:45 -06:00
Christopher Allan Webber
def13c549a Beginnings of the SQL migration manager 2012-01-29 16:33:44 -06:00
Christopher Allan Webber
70b44584ae Big ol' start of the SQL migrations system.
Things definitely don't work yet, but should be heading in the right direction.
2012-01-29 16:33:44 -06:00
Christopher Allan Webber
8a9aa07583 Committing extracted and compiled translations 2012-01-29 13:47:51 -06:00
Christopher Allan Webber
ef9c5bbda6 Committing present MediaGoblin translations before pushing extracted messages 2012-01-29 13:47:36 -06:00
Christopher Allan Webber
76d6323fff Adding a line reminding user to push up commits 2012-01-29 13:32:41 -06:00
Christopher Allan Webber
f62b697eb2 Committing extracted and compiled translations 2012-01-29 13:31:47 -06:00
Christopher Allan Webber
8e5596fb1d Hm, maybe this is better... that didn't fix the stop-in-the-middle issue. 2012-01-29 13:30:32 -06:00
Christopher Allan Webber
f4b206166e Update update_translations script to consider several things conditionally
Specifically, previously if there was nothing to git add, whole script would just die
2012-01-29 13:22:21 -06:00
Elrond
de91730336 Nearly complete support for Tags
These changes allow all of the rest of the code to use tags
in sql as they were used on mongo. It's not efficient at
all, as changing tags usually means to remove all old tags
and adding all new.

The only problem here is: Old slugs for tags are not
removed, because they're shared across all MediaTags and
dropping orphans is not always easy.
2012-01-28 19:32:43 +01:00
Joar Wandborg
ebc0e38239 Resized a test_exif test image. 1.9M is unnecessarily large. 2012-01-28 18:53:36 +01:00
Joar Wandborg
3d0d3bc972 Merge remote-tracking branch 'joar/exif-rebase' 2012-01-28 18:47:01 +01:00
Elrond
d7bec8577e Add develover sql switch
If you want to play with the current state of sql, you need
a switch to turn it on. So here is the super secret
developer switch.

So you want to know where it is?

Here it is:

Create a file mediagoblin/db/sql_switch.py and put one line
in it: "use_sql = True" (or False to disable again). Right,
that's it. If you want to delete it, remember to delete the
*.pyc too.

Be careful not to "git add" it by accident!
2012-01-28 18:36:44 +01:00
Christopher Allan Webber
b4e877ae97 We were using translitcodec and I didn't understand how it worked ;)
My bad!
2012-01-28 11:31:26 -06:00
Christopher Allan Webber
da471f26f2 We aren't using translitcodec anymore. Kill it! 2012-01-28 11:13:03 -06:00
Elrond
3e907d5516 Let some code support "media without slug"
The upcoming SQL database will allow having media without a
slug again. This might especially be useful for API
support, where the uploaded image (media) does not have
*any* information to generate a slug from.

This code change mostly allows the sql backend to have no
slug in its model and improves some parts to properly
handle that.

It specifically does not have any web frontend support to
edit/create MediaEntries with no slug.
2012-01-28 13:53:55 +01:00
Joar Wandborg
9542a2ba07 JavaScript fixes - AGPL headers, etc
- Added AGPL header to comment_show.js, show_password.js
  and geolocation-map.js
- Removed console.log from geolocation-map.js
2012-01-28 01:31:56 +01:00
Joar Wandborg
cd1b836ed4 Scripts and styleshets for geolocation map - Conditional
Scripts and stylesheets for the geolocation map are now
switched on/off with the geolocation map itself.
2012-01-27 02:13:07 +01:00
Joar Wandborg
184dbcdacc Adding previously erroneously gitignored extlib/leaflet/{lib,dist,build}/ files 2012-01-27 01:55:50 +01:00
Joar Wandborg
a8382a3a86 Updated .gitignore due to it blacking out the extlib/leaflet/dist/ directory 2012-01-27 01:52:57 +01:00
Elrond
3c43cfc9f9 Move declarative_base Base into base.py
The base class of all models "Base" should be in base.py.
2012-01-26 23:07:39 +01:00
Elrond
997b419fe3 Add "mediagoblin/templates *.txt" to packaging
Again thanks to Clint Byrum!
2012-01-26 22:14:48 +01:00