Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show fields returns 'NULL' (in quotes) #7692

Closed
verdverm opened this issue Apr 3, 2024 · 2 comments · Fixed by dolthub/go-mysql-server#2433
Closed

Show fields returns 'NULL' (in quotes) #7692

verdverm opened this issue Apr 3, 2024 · 2 comments · Fixed by dolthub/go-mysql-server#2433
Assignees

Comments

@verdverm
Copy link

verdverm commented Apr 3, 2024

Linking: knex/knex#6053

And creating issue after @jycor did some more digging

@jycor jycor self-assigned this Apr 3, 2024
@verdverm
Copy link
Author

verdverm commented Apr 3, 2024

This issue might have a minimal reproducer, though not specific commands

strapi/strapi#20020

@verdverm
Copy link
Author

verdverm commented Apr 3, 2024

Full logs from one attempt to migrate the DB by Strapi.
This is post manually fixing the 'NULL' issue and now the foreign key issue

tmp.log

I wonder if one of the selects or deletes in the logs is missing the mark, so it doesn't drop the foreign key before dropping the index

yarn run v1.22.21
$ strapi develop
✔ Cleaning dist dir (5ms)
⠋ Loading Strapi⠋ Building build context
[INFO] Including the following ENV variables as part of the JS bundle:
    - ADMIN_PATH
    - STRAPI_ADMIN_BACKEND_URL
    - STRAPI_TELEMETRY_DISABLED
✔ Building build context (69ms)
✔ Creating admin (197ms)
⠋ Loading Strapi[ERROR]  There seems to be an unexpected error, try again with --debug for more information 

┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                                                                                            │
│   Error: alter table `admin_permissions_role_lnk` drop index `admin_permissions_role_links_inv_fk` - cannot drop index:    │
│   `admin_permissions_role_links_inv_fk` is used by foreign key `admin_permissions_role_links_inv_fk`                       │
│   at Packet.asError (/Users/tony/ts/services/strapi/node_modules/mysql2/lib/packets/packet.js:728:17)                      │
│   at Query.execute (/Users/tony/ts/services/strapi/node_modules/mysql2/lib/commands/command.js:29:26)                      │
│   at Connection.handlePacket (/Users/tony/ts/services/strapi/node_modules/mysql2/lib/connection.js:478:34)                 │
│   at PacketParser.onPacket (/Users/tony/ts/services/strapi/node_modules/mysql2/lib/connection.js:97:12)                    │
│   at PacketParser.executeStart (/Users/tony/ts/services/strapi/node_modules/mysql2/lib/packet_parser.js:75:16)             │
│   at Socket.<anonymous> (/Users/tony/ts/services/strapi/node_modules/mysql2/lib/connection.js:104:25)                      │
│   at Socket.emit (node:events:518:28)                                                                                      │
│   at Socket.emit (node:domain:488:12)                                                                                      │
│   at addChunk (node:internal/streams/readable:559:12)                                                                      │
│   at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)                                                   │
│                                                                                                                            │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
✨  Done in 4.92s.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants