aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/db
Commit message (Collapse)AuthorAgeFilesLines
* Duplicate migration numbers not allowed, broChristopher Allan Webber2011-07-131-0/+2
|
* We should *raise* MissingCurrentMigration :)Christopher Allan Webber2011-07-131-1/+1
| | | | Thanks for the catch, Elrond.
* Removing old style migrations... not in use anymoreChristopher Allan Webber2011-07-112-63/+3
|
* Just making a note of where the new migrations will go!Christopher Allan Webber2011-07-101-0/+11
|
* give option in connect_database_from_config to connect to a pymongo.ConnectionChristopher Allan Webber2011-07-101-8/+25
|
* Made it so that it's migrate_new() which installs the migrationChristopher Allan Webber2011-07-101-3/+18
| | | | version if missing, migrations_to_run just throws an error if not set
* No reason to have migration_number optional or default to NoneChristopher Allan Webber2011-07-101-1/+1
|
* Move the call to install_migration_version_if_missing() to migrations_to_run()Christopher Allan Webber2011-07-101-5/+7
| | | | | This means there's a serious side effect of calling this, but there's no way to get useful data here unless if that's set anyway.
* install_migration_version_if_missing() now a separate functionChristopher Allan Webber2011-07-101-7/+19
| | | | | Also added it to MigrationManager.migrate_new(), because we'll always need a migration number when migrating.
* Make sure all these strings in db/util.py are unicodeChristopher Allan Webber2011-07-101-6/+6
|
* Simpler run_migrations method.Christopher Allan Webber2011-07-101-16/+13
| | | | | | | | Allows for calbacks, should be useful for printing output and catching things in tests. Gets rid of the generator stuff which now that I think of it is a messy idea.
* Making sure migration_number > 0 :)Christopher Allan Webber2011-07-091-1/+3
|
* run_new_migrations() makes more senseChristopher Allan Webber2011-07-091-1/+1
|
* Some instructions in the RegisterMigration docstring on how to use.Christopher Allan Webber2011-07-091-0/+13
|
* latest_migration now returns migration numbers only, and 0 if no migrations.Christopher Allan Webber2011-07-091-6/+10
|
* Migrating quietly, not iteratively, that comment should say!Christopher Allan Webber2011-07-091-1/+1
|
* New migration utility code.... I haven't tested this! ;)Christopher Allan Webber2011-07-091-0/+136
| | | | | | | | I think it's looking right though. - Provides MigrationManager which should have plenty of utilities for doing migrations hopefully correctly :) - Provides RegisterMigration which should be able to decorate migrations and register them in doing so
* This should actually fix the next and previous buttons now. Sorry I borked ↵Christopher Allan Webber2011-07-071-2/+2
| | | | the merge!
* Merge remote branch ↵Christopher Allan Webber2011-07-061-3/+3
|\ | | | | | | | | | | | | 'remotes/gullydwarf-cfdv/f423_match_image_ordering_between_scroll_and_gallery' Conflicts: mediagoblin/db/models.py
| * Feature #423 - gallery and scroll image ordering matchCaleb Forbes Davis V2011-07-041-4/+4
| |
* | Merge remote branch 'remotes/gullydwarf-cfdv/f435_limit_prev_next_by_processed'Christopher Allan Webber2011-07-061-2/+4
|\ \
| * | f#435 - avoids linking to unprocessed media in prev and nextCaleb Forbes Davis V2011-07-051-2/+4
| |/
* / slug-style urls in previous and next urls look much betterCaleb Forbes Davis V2011-07-051-2/+2
|/ | | | Bug #434 - identifies media by slug instead of _id in prev/next
* Merge remote branch 'remotes/gullydwarf-cfdv/f401_prev_next_media_nav'Christopher Allan Webber2011-07-022-2/+28
|\ | | | | | | | | | | Conflicts: mediagoblin/db/models.py mediagoblin/templates/mediagoblin/user_pages/media.html
| * adds previous and next links in the sidebarCaleb Forbes Davis V2011-07-022-2/+28
| | | | | | | | | | | | | | | | Feature #401 - previous/next navigation on media pages * media.html includes a new prev_next.html template containing the links * prev_next.html calls functions added to the media model to retrieve the appropriate objects from the database, formatted with urlgen * a small change to util.py brings ASCENDING into the mix
* | Note from Chris Webber prefacing Elrond's DB abstraction idea.Christopher Allan Webber2011-07-021-0/+12
| |
* | Merge remote branch 'remotes/elrond/idea/db_doc'Christopher Allan Webber2011-07-021-0/+34
|\ \
| * | Document the db submodule a bitElrond2011-06-301-0/+34
| |/ | | | | | | | | Document the ideas behind the db submodule. And document what that actually means.
* | Merge remote branch ↵Christopher Allan Webber2011-07-021-17/+5
|\ \ | |/ |/| | | | | | | | | 'remotes/jwandborg/feature_362-simple_comments-acts_on_feedback' Conflicts: mediagoblin/templates/mediagoblin/user_pages/media.html
| * Issue #362 - Simple comments - Changes based on feedback recieved from ↵Joar Wandborg2011-07-011-17/+5
| | | | | | | | | | | | | | | | | | | | | | | | #mediagoblin * `db.models` - Removed `MediaEntry.get_comments()` and replaced it with a helper which just returns a cursor for the comments query * `media.html` - Added `{% set comment_author = comment.author() %}` * `user_pages.views` - media_home() now passes `MediaEntry.get_comments()` directly to `Pagination`, handles pagination for comments. * Added `MEDIA_COMMENTS_PER_PAGE` to define the number of comments per page in the `media_home()` view.
| * Merge branch 'feature_362-simple_comments'Joar Wandborg2011-06-291-3/+43
| |\
* | | Comment indexesChristopher Allan Webber2011-06-301-0/+10
| | |
* | | Merge remote branch 'remotes/jwandborg/feature_362-simple_comments'Christopher Allan Webber2011-06-291-3/+43
|\ \ \ | |/ / |/| / | |/
| * Issue #362 - Updated the MediaComment modelJoar Wandborg2011-06-291-4/+20
| | | | | | | | | | | | | | * `MediaComment.get_comments()` now uses pagination * `MediaComment.get_comments()` now sorts by `created` DESC * `MediaComment.media_entry` is now **required** * `MediaComment.media_entry()` now returns parent `MediaEntry`
| * Issue 362 - Add simple commentsJoar Wandborg2011-06-271-1/+25
| | | | | | | | | | * Added MediaComment database model Holds `media_entry` (`ObjectId`), `author` (`ObjectId`), `created`, `content` and `content_html`.
* | Documenging index utils and adjusting how remove_deprecated_indexes gets ↵Christopher Allan Webber2011-06-271-2/+17
| | | | | | | | | | | | | | | | | | | | arguments More specifically, we now just take a dictionary of lists, like: {'collection': ['index_identifier1', 'index_identifier2']} Previously we took something with more info like in add_new_indexes, but that extra info isn't really necessary.
* | Documentation updates to indexes.py's docstringChristopher Allan Webber2011-06-271-5/+19
| | | | | | | | Includes information on how to deprecate indexes.
* | Adding our current indexes and removing the index that was in models.pyChristopher Allan Webber2011-06-272-11/+12
| |
* | Tools to add / remove indexes from collectionsChristopher Allan Webber2011-06-271-0/+65
| |
* | Store the collection information in the ACTIVE_INDEXES keysChristopher Allan Webber2011-06-261-14/+9
| |
* | A base set of indexes for us to use with our new indexing tool.Christopher Allan Webber2011-06-261-0/+103
|/
* Merge remote branch 'remotes/elrond/idea/invalidid'Christopher Allan Webber2011-06-221-0/+1
|\
| * Move InvalidId to db.utilElrond2011-06-201-0/+1
| | | | | | | | | | | | Instead of import InvalidId from the low level bson module, first import it in our db.util wrapper and second import it from pymongo.errors.
* | Merge remote branch 'refs/remotes/gullydwarf-cfdv/is315'Christopher Allan Webber2011-06-212-2/+21
|\ \
| * | assigns migration steps to User database objectscfdv2011-06-201-0/+2
| | | | | | | | | | | | | | | | | | adds the migration_handler to the User db class, connecting the migration steps in ../db/migrations.py to the migration code in gmg_commands
| * | removes unecessary dependence on existence of username for User migration01, ↵cfdv2011-06-201-6/+5
| | | | | | | | | | | | + fix whitespace issues
| * | adds accommmodations for migration of fields in User: bio and urlcfdv2011-06-201-2/+18
| | |
| * | Merge remote-tracking branch 'origin/master' into is315cfdv2011-06-202-1/+18
| |\ \
| * | | baby step towards enabling profile editscfdv2011-06-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adds * url and bio fields to database * form for editing the user profile * route to the edit profile controller * view for the profile editing page * template for the profile editing page * link to edit profile in the welcome page still needs * thorough inspection to see if it makes sense * tests * ?
| * | | adds user bio and website url fields to the databasecfdv2011-06-181-0/+2
| | |/ | |/|