Migrate atlasId -> collectionId

This commit is contained in:
Tom Moor
2018-08-07 23:23:26 -07:00
parent f49c495a9a
commit 18cfe26e83
11 changed files with 50 additions and 24 deletions

View File

@@ -81,9 +81,9 @@ export async function buildDocument(overrides: Object = {}) {
overrides.userId = user.id;
}
if (!overrides.atlasId) {
if (!overrides.collectionId) {
const collection = await buildCollection(overrides);
overrides.atlasId = collection.id;
overrides.collectionId = collection.id;
}
return Document.create({

View File

@@ -65,7 +65,7 @@ const seed = async () => {
const document = await Document.create({
parentDocumentId: null,
atlasId: collection.id,
collectionId: collection.id,
teamId: team.id,
userId: collection.creatorId,
lastModifiedById: collection.creatorId,