aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/db/sql/convert.py
Commit message (Collapse)AuthorAgeFilesLines
* SQL: Improve video media_data tableElrond2012-03-011-0/+1
| | | | | | 1. Make the foreignkey the primary_key. 2. Add width/height, as those are currently in use for the media_data
* Attachment support in the SQL backendElrond2012-02-281-1/+10
| | | | | | | | | attachments working with the sql backend. - SQL Schema for attachment files, ordering attachments by their name, not by the submission order (as earlier). - Dot-Notation for attachments, where missing. - convert existing attachments over from mongo -> sql
* Create "gmg convert_mongo_to_sql" commandElrond2012-02-231-3/+3
| | | | | | | | | Finally, to make testing of sql a bit easier, create a bin/gmg command to do the conversion from mongo to sql. It's currently named "convert_mongo_to_sql". The most important option is the gmg -cf option to give a configfile with the appropiate sql_engine definition.
* mongo to sql convert: Better OrderingElrond2012-02-231-4/+4
| | | | | | | | Order the conversion by the "created" attribute. That way the sql ids are mostly in the order they would have been, if sql was used earlier. Makes things nicer to look at in a db dump.
* Start having useful defaults for SQLElrond2012-02-181-2/+1
| | | | | | | | | | Mostly this means: Havintg a config_spec.ini that has a local (relative to mediagoblin.ini) sqlite db with the name "mediagoblin.db". Also: - Add to .gitignore - Add a notice to mediagoblin.ini about the db
* SQL: fail_metadata as JSON encoded fieldElrond2012-02-181-1/+1
| | | | | | | | fail_metadata used to be a dict in mongo. So a json encoded field should be okay too. We could use a pickled field instead, which would be more flexible.
* Drop pre-rendered html: MediaComment.content_htmlElrond2012-02-181-1/+1
| | | | | | | | | | | After a bit of discussion, we decided to drop the pre-rendered html from the database and render it on the fly. In another step, we will use some proper caching method to cache this stuff. This commit affects the MediaComment.content_html part.
* Drop pre-rendered html: MediaEntry.description_htmlElrond2012-02-181-1/+1
| | | | | | | | | | | After a bit of discussion, we decided to drop the pre-rendered html from the database and render it on the fly. In another step, we will use some proper caching method to cache this stuff. This commit affects the MediaEntry.description_html part.
* Drop pre-rendered html: User.bio_htmlElrond2012-02-181-1/+1
| | | | | | | | | | | After a bit of discussion, we decided to drop the pre-rendered html from the database and render it on the fly. In another step, we will use some proper caching method to cache this stuff. This commit affects the User.bio_html part.
* Fix copyright statements; add LICENSE for EXIF.pyWill Kahn-Greene2012-02-081-1/+1
|
* Convert over the license field, too!Christopher Allan Webber2012-01-211-1/+1
|
* Add copyright header and a bit of pep8ificationElrond2012-01-201-0/+17
| | | | | | Nearly all the sql files missed a copyright header. So added it! And while there fixed a few pep8 things.
* Add MediaFile table and related infrastructure.Elrond2012-01-111-1/+6
| | | | | | | | | | | | - This adds a new SQL table field type for path tuples. They're stored as '/' separated unicode strings. - Uses it to implement a MediaFile table. - Add relationship and proxy fields on MediaEntry to give a nice media_files "view" there. - Let the converter fill the MediaFile.
* sql convert: Use more library functionsElrond2012-01-011-11/+9
| | | | | | | | | | 1. Use the new setup_connection_and_db_from_config in the sql backend. 2. Use sql and mongo specific functions wherever appropiate instead of the generic "db.X" one. This makes the converter more indepedent of the current backend choice.
* SQL Model: Forgot MediaEntry.state fieldElrond2011-12-281-1/+1
| | | | | | | | While creating the new SQL model, the "state" field of MediaEntry was left out. Currently using a plain unicode string for it. Maybe should use sqlalchemy.types.Enum?
* SQL: mongokit like interfaceElrond2011-12-181-1/+6
| | | | | | | | In trying to ease the migration to SQL, created an interface to sqlalchemy that looks a lot like the interface that is currently in use. *WARNING* Work in progress
* Simple Mongo -> SQL migration toolElrond2011-12-171-0/+143
This is just a start at a Migration tool from Mongo to SQL. It fills all currently available SQL models with data from MongoDB. A few fields in the SQL tables are left out, because some data format migrations are needed (notably: queue_file_name). This thing lives in mediagoblin/db/sql/convert.py because it has a lot of stuff hardcoded and is not, repeat not for end users! Hard coded: - output database: ./mediagoblin.db (sqlite) - Mediagoblin config: ./mediagoblin.ini