mozilla-services / pushbox

Durable Storage for Push
Mozilla Public License 2.0
6 stars 9 forks source link

database migration error #88

Open jackyzy823 opened 2 years ago

jackyzy823 commented 2 years ago

migration with new database (from v0.3.1)

just using docker-compose.yaml diesel_migration raise error:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: HandlerError { kind: MigrationErrorDb("Failed with: You have an error in your SQL syntax; check the
 manual that corresponds to your MySQL server version for the right syntax to use near \'DELIMITER $$\nDROP PROCEDURE IF EXISTS `create_index` $$\nCREATE PROCEDURE `create\' at line 4"), backtrace:    0: pushb
ox::db::run_embedded_migrations

I think it may be related to DELIMITER can be only used in mysql cli but not SQL file.

Related Issue: https://github.com/diesel-rs/diesel/issues/2622.

migration with exists database since the name/timestamp 2018-03-28-211330_create_users_table not changed , so the up.sql will not be executed by diesel_migration again.