-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
astro db push suggests adding 'deprecated: true' flag to the wrong column/table in error message #10510
Copy link
Copy link
Closed
Labels
- P4: importantViolate documented behavior or significantly impacts performance (priority)Violate documented behavior or significantly impacts performance (priority)
Description
Astro Info
Astro v4.5.8
Node v18.18.2
System macOS (arm64)
Package Manager bun
Output server
Adapter @astrojs/vercel/serverless
Integrations astro:db
@astrojs/db/file-url
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
astro db push error message incorrectly suggests adding 'deprecated: true' flag to Cards.timestamp instead of Cards.date when detecting potential column rename. The same goes for table renaming.
astro db push
✔ Connected to remote database.
▶ Potential column rename detected: Cards.timestamp, Cards.date
You cannot add and remove columns in the same table.
To resolve, add a 'deprecated: true' flag to 'Cards.timestamp' instead.
Stack trace:
at getMigrationQueries (file:///Users/jacoblamb/GitHub/minecraft-memory-test/node_modules/@astrojs/db/dist/core/cli/migration-queries.js:62:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async db (file:///Users/jacoblamb/GitHub/minecraft-memory-test/node_modules/astro/dist/cli/db/index.js:20:3)
at async cli (file:///Users/jacoblamb/GitHub/minecraft-memory-test/node_modules/astro/dist/cli/index.js:169:5)
What's the expected result?
✔ Connected to remote database.
▶ Potential column rename detected: Cards.timestamp, Cards.date
You cannot add and remove columns in the same table.
To resolve, add a 'deprecated: true' flag to 'Cards.date' instead.
Stack trace:
at getMigrationQueries (file:///Users/jacoblamb/GitHub/minecraft-memory-test/node_modules/@astrojs/db/dist/core/cli/migration-queries.js:62:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async db (file:///Users/jacoblamb/GitHub/minecraft-memory-test/node_modules/astro/dist/cli/db/index.js:20:3)
at async cli (file:///Users/jacoblamb/GitHub/minecraft-memory-test/node_modules/astro/dist/cli/index.js:169:5)
Link to Minimal Reproducible Example
https://astro.new/basics?on=stackblitz
Participation
- I am willing to submit a pull request for this issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
- P4: importantViolate documented behavior or significantly impacts performance (priority)Violate documented behavior or significantly impacts performance (priority)