Skip to content

Commit b2a3be4

Browse files
committed
fix: attribute changing during push
1 parent 3ea8de6 commit b2a3be4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ const checkAttributeChanges = (remote, local, collection, recreating = true) =>
829829
const keyName = `${chalk.yellow(local.key)} in ${collection.name} (${collection['$id']})`;
830830
const action = chalk.cyan(recreating ? 'recreating' : 'changing');
831831
let reason = '';
832-
let attribute = remote;
832+
let attribute = recreating ? remote : local;
833833

834834
for (let key of Object.keys(remote)) {
835835
if (!KeysAttributes.has(key)) {
@@ -2044,6 +2044,7 @@ const pushTable = async ({ returnOnZero, attempts } = { returnOnZero: false }) =
20442044
const changes = [];
20452045
if (remoteTable.name !== table.name) changes.push('name');
20462046
if (remoteTable.rowSecurity !== table.rowSecurity) changes.push('rowSecurity');
2047+
if (remoteTable.enabled !== table.enabled) changes.push('enabled');
20472048
if (JSON.stringify(remoteTable['$permissions']) !== JSON.stringify(table['$permissions'])) changes.push('permissions');
20482049

20492050
if (changes.length > 0) {

0 commit comments

Comments
 (0)