luckyframework / luckyframework/breeze
Exceptions thrown when running lucky db.migrate (breeze runs fine)
- Dominant language
- Crystal
- Stars
- 22
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
- Breeze version: main (0.2.0 at 1955e5c)
- Lucky version: 1.0.0-rc1 (clean at init with no extra shards besides breeze)
- Crystal: 1.6.0
Running `lucky db.migrate` after `lucky breeze.install` throws around 12 exeptions (11 before `CreateBreezeTables` & 1 before `AddMoreDataToSqlStatements` migrations)
Breeze runs fine with no issues after migrate.
All expections are with this output:
```
Unhandled exception in spawn(name: Create Breeze::SaveBreezeSqlStatement): relation "breeze_sql_statements" does not exist (PQ::PQError)
from lib/pg/src/pq/connection.cr:215:7 in 'handle_error'
from lib/pg/src/pq/connection.cr:198:7 in 'handle_async_frames'
from lib/pg/src/pq/connection.cr:174:7 in 'read'
from lib/pg/src/pq/connection.cr:169:7 in 'read'
from lib/pg/src/pq/connection.cr:447:31 in 'expect_frame'
from lib/pg/src/pq/connection.cr:446:5 in 'expect_frame'
from lib/pg/src/pg/statement.cr:18:5 in 'perform_query'
from lib/db/src/db/statement.cr:93:9 in 'perform_query_with_rescue'
from lib/db/src/db/statement.cr:80:7 in 'query:args'
from lib/db/src/db/query_methods.cr:46:7 in 'query:args'
from lib/db/src/db/query_methods.cr:61:12 in 'insert'
from lib/avram/src/avram/save_operation.cr:265:7 in 'insert_or_update'
from lib/avram/src/avram/save_operation.cr:211:9 in 'save'
from lib/avram/src/avram/save_operation.cr:237:8 in 'save!'
from lib/breeze/src/breeze/operations/save_breeze_sql_statement.cr:1:1 in 'create!:breeze_request_id:statement:args:model:elapsed_text'
from lib/breeze/src/breeze.cr:15:3 in '->'
from /home/abbsi/.asdf/installs/crystal/1.6.0/share/crystal/src/fiber.cr:146:11 in 'run'
from /home/abbsi/.asdf/installs/crystal/1.6.0/share/crystal/src/fiber.cr:98:34 in '->'
from ???
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the issue with `lucky breeze.install` followed by `lucky db.migrate`, then inspect the migrations around `CreateBreezeTables` and `AddMoreDataToSqlStatements`, along with `lib/breeze/src/breeze/operations/save_breeze_sql_statement.cr`. Done means the migrations complete without `breeze_sql_statements` relation errors and Breeze still runs normally.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- crystal, postgresql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100