Open kugra-al opened 1 year ago
Updating items doesn't work either. This should be fixed with migrations
Workaround - put everything that should never be dynamic generated into 1 migration file:
When we need to reset items, run:
php artisan migrate --path=/database/migrations/2023_02_05_122929_create_items_table.php
Ed: probably need a 'dropIfExists' thing in the migration file
Workaround added in https://github.com/kugra-al/al-laravel/commit/9059cb4c132278f31affb9aef74bef958ba7984f
Still should be done using migrations (that the 'correct' way).
Currently it just uses schema directly:
https://github.com/kugra-al/al-laravel/blob/9466a444137da5e553f2b1cc8eb1e4810316d088/app/Jobs/WriteItmCacheToDatabase.php#L49-L53
This means we can't easily roll back to a fresh version of
items
- have to migrate:fresh and reset the whole database.Need to write a migration file so we can just truncate table and rollback that migration when we need to refresh
items
.