You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Astro v4.6.4
Node v21.7.3
System macOS (arm64)
Package Manager npm
Output server
Adapter @astrojs/cloudflare
Integrations @astrojs/tailwind
@astrojs/mdx
astro:db
@astrojs/db/file-url
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
I've defined my tables in config.ts and have made some changes to them (though they really aren't breaking changes, as I'm adding some new columns but for some reason, the push kept failing). Since I'm in the early stages, I just want to reset and recreate the database.
The documentation says I should do npm run astro db push --remote --force-reset
but when I do that, I see the following messages:
> owdcom@0.0.1 astro
> astro db push
✔ Connected to remote database.
Database schema is out of date.
Pushing database schema updates...
https://db.services.astro.build/db/push failed: 400 Bad Request
{"success":false,"error":{"code":"SQL_QUERY_FAILED","details":"SQLITE_CONSTRAINT: SQLite error: FOREIGN KEY constraint failed"}}
/db/push fetch failed: 400 Bad Request
There are very few foreign keys, and they are all named and referenced correctly (and have not changed). With the generic error message, I cannot figure out where the issue lies.
I see the same whether I do --remote or --force-reset. It's as if the force-reset flag isn't being considered.
PS - I do not know if this is related to some of the db issues I've been seeing today and raised a separate ticket.
What's the expected result?
Create the tables per the new schema.
Link to Minimal Reproducible Example
db related
Participation
I am willing to submit a pull request for this issue.
The text was updated successfully, but these errors were encountered:
Hello @pMay2021. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with needs repro will be closed if they have no activity within 3 days.
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
I've defined my tables in
config.ts
and have made some changes to them (though they really aren't breaking changes, as I'm adding some new columns but for some reason, the push kept failing). Since I'm in the early stages, I just want to reset and recreate the database.The documentation says I should do
npm run astro db push --remote --force-reset
but when I do that, I see the following messages:
There are very few foreign keys, and they are all named and referenced correctly (and have not changed). With the generic error message, I cannot figure out where the issue lies.
I see the same whether I do --remote or --force-reset. It's as if the force-reset flag isn't being considered.
PS - I do not know if this is related to some of the db issues I've been seeing today and raised a separate ticket.
What's the expected result?
Create the tables per the new schema.
Link to Minimal Reproducible Example
db related
Participation
The text was updated successfully, but these errors were encountered: