Skip to content

Commit d4a13df

Browse files
fix: remove unused drop table in 1st migration (#587)
1 parent 7209093 commit d4a13df

3 files changed

Lines changed: 2 additions & 6 deletions

File tree

admin/src/api/validators.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const navigationItemBaseSchema = z.object({
1818
documentId: z.string(),
1919
title: z.string(),
2020
type: navigationItemTypeSchema,
21-
path: z.string(),
21+
path: z.string().or(z.null()).optional(),
2222
externalPath: z.string().or(z.null()).optional(),
2323
uiRouterKey: z.string(),
2424
menuAttached: z.boolean(),

admin/src/pages/HomePage/components/NavigationItemForm/utils/form.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ const navigationInternalItemFormSchema = ({
9191
isSingleSelected,
9292
}).extend({
9393
type: z.literal('INTERNAL'),
94-
path: z.string(),
94+
path: z.string().or(z.null()).optional(),
9595
externalPath: z.string().nullish(),
9696
relatedType: z.string(),
9797
related: isSingleSelected ? z.string().optional() : z.string(),

migrations/strapi-plugin-navigation-3.0.0-no-1-related-id-to-documentid.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ module.exports = {
4242
})
4343
);
4444

45-
// Drop the old tables
46-
await knex.schema.dropTable(SOURCE_TABLE_NAME);
47-
await knex.schema.dropTable(SOURCE_LINK_TABLE_NAME);
48-
4945
console.log('Navigation plugin :: Migrations :: Backup navigation item related table - DONE');
5046
},
5147
};

0 commit comments

Comments
 (0)