This repository was archived by the owner on Oct 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 61
This repository was archived by the owner on Oct 7, 2024. It is now read-only.
How to port an extra column ("fields") from "strapi_permission" to "admin_permissions" #19
Copy link
Copy link
Open
Labels
issue: bugIssue reporting a bugIssue reporting a bugseverity: mediumIf it breaks the basic use of the product but can be worked aroundIf it breaks the basic use of the product but can be worked aroundsource: v3-SQL to v4-SQLstatus: pending reproductionWaiting for free time to reproduce the issue, or more informationWaiting for free time to reproduce the issue, or more information
Description
Bug report
Required System information
- Node.js version: v14.18.3
- NPM version: 0.34.0
- Source Strapi version: 3.6.3
- Target Strapi version: 4.1.12
- Source Database: PostgreSQL 12.9 (Ubuntu 12.9-0ubuntu0.20.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, 64-bit
- Target Database: same as above
- Operating system: Linux Mint 20.2
- Which script are you running: v3-sql-v4-sql, pg
Describe the bug
I have an extra column on v3's strapi_permission table. At the moment I'm not sure if it's being used by the lib or the project. What would be the best way to port it to v4.
I get this error when trying to migrate SQL data, v3 to v4:
column "fields" of relation "admin_permissions" does not exist
Steps to reproduce the behavior
1.Follow the instruction from README file
2. See errors
Expected behavior
Not to have this error because afaik there isn't any fields column in v4's admin_permissions table.
Screenshots
n/a
Code snippets
Longer stack:
yarn start
yarn run v1.22.18
$ node index.js
Migrating Core Store TBA
Migrating 100/197 items from core_store to strapi_core_store_settings
core_store batch #1
core_store batch #2
Migrating Admin
Migrating 9 items from strapi_role to admin_roles
strapi_role batch #1
Migrating 109 items from strapi_administrator to admin_users
strapi_administrator batch #1
strapi_administrator batch #2
strapi_administrator batch #3
Migrating 109 items from strapi_users_roles to admin_users_roles_links
strapi_users_roles batch #1
strapi_users_roles batch #2
strapi_users_roles batch #3
Migrating 871 items from strapi_permission to admin_permissions
strapi_permission batch #1
(node:66281) UnhandledPromiseRejectionWarning: error: insert into "admin_permissions" ("action", "conditions", "created_at", "fields", "id", "properties", "subject", "updated_at") values ($1, $2, $3, $4, $5, $6, $7, $8), ($393, $394, $395, $396, $397, $398, $399, $400) - column "fields" of relation "admin_permissions" does not exist
at Parser.parseErrorMessage (strapi-migration-scripts/v3-sql-v4-sql/node_modules/pg-protocol/dist/parser.js:287:98)
at Parser.handlePacket (strapi-migration-scripts/v3-sql-v4-sql/node_modules/pg-protocol/dist/parser.js:126:29)
at Parser.parse (strapi-migration-scripts/v3-sql-v4-sql/node_modules/pg-protocol/dist/parser.js:39:38)
at Socket.<anonymous> (strapi-migration-scripts/v3-sql-v4-sql/node_modules/pg-protocol/dist/index.js:11:42)
at Socket.emit (events.js:400:28)
at addChunk (internal/streams/readable.js:293:12)
at readableAddChunk (internal/streams/readable.js:267:9)
at Socket.Readable.push (internal/streams/readable.js:206:10)
at TCP.onStreamRead (internal/stream_base_commons.js:188:23)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:66281) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:66281) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Additional context
n/a
Metadata
Metadata
Assignees
Labels
issue: bugIssue reporting a bugIssue reporting a bugseverity: mediumIf it breaks the basic use of the product but can be worked aroundIf it breaks the basic use of the product but can be worked aroundsource: v3-SQL to v4-SQLstatus: pending reproductionWaiting for free time to reproduce the issue, or more informationWaiting for free time to reproduce the issue, or more information