Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Commit

Permalink
Only prevent running if both buckets exist
Browse files Browse the repository at this point in the history
  • Loading branch information
robyoung committed Oct 7, 2013
1 parent 6f2529d commit 63b3c0d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions migrations/004_load_seed_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,8 @@
def up(db):
names = db.collection_names()

if "users" in names:
log.info("users collection already created")
return

if "buckets" in names:
log.info("buckets collection already created")
if "users" in names and "buckets" in names:
log.info("both users and buckets collections already exist")
return

invoke = os.path.join(os.path.dirname(sys.executable), "invoke")
Expand Down

0 comments on commit 63b3c0d

Please sign in to comment.