Skip to content

Commit 4852ce6

Browse files
authored
Merge pull request #1204 from appwrite/fix-missing-relatedCollectionId
2 parents fc6d378 + 83f9ae8 commit 4852ce6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

templates/cli/lib/commands/push.js.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ const createAttribute = (databaseId, collectionId, attribute) => {
550550
return databasesCreateRelationshipAttribute({
551551
databaseId,
552552
collectionId,
553-
relatedCollectionId: attribute.relatedCollection,
553+
relatedCollectionId: attribute.relatedTable ?? attribute.relatedCollection,
554554
type: attribute.relationType,
555555
twoWay: attribute.twoWay,
556556
key: attribute.key,
@@ -669,7 +669,7 @@ const updateAttribute = (databaseId, collectionId, attribute) => {
669669
return databasesUpdateRelationshipAttribute({
670670
databaseId,
671671
collectionId,
672-
relatedCollectionId: attribute.relatedCollection,
672+
relatedCollectionId: attribute.relatedTable ?? attribute.relatedCollection,
673673
type: attribute.relationType,
674674
twoWay: attribute.twoWay,
675675
key: attribute.key,
@@ -883,7 +883,7 @@ const createIndexes = async (indexes, collection) => {
883883
collectionId: collection['$id'],
884884
key: index.key,
885885
type: index.type,
886-
attributes: index.attributes,
886+
attributes: index.columns ?? index.attributes,
887887
orders: index.orders,
888888
parseOutput: false
889889
});

0 commit comments

Comments
 (0)