mirror of
https://github.com/danbulant/Portfolio
synced 2026-06-13 11:32:19 +00:00
fix: remove fk for sqlite tests
This commit is contained in:
parent
43c0e1bf17
commit
46730d791c
1 changed files with 11 additions and 4 deletions
|
|
@ -19,18 +19,25 @@ impl MigratorTrait for Migrator {
|
|||
Box::new(m20221024_121621_create_candidate::Migration),
|
||||
Box::new(m20221024_124701_create_parent::Migration),
|
||||
Box::new(m20221025_154422_create_session::Migration),
|
||||
Box::new(m20221027_194728_session_create_user_fk::Migration),
|
||||
Box::new(m20221112_112212_create_parent_candidate_fk::Migration),
|
||||
Box::new(m20221221_162232_create_admin_session::Migration),
|
||||
Box::new(m20221028_194728_session_create_admin_fk::Migration),
|
||||
];
|
||||
|
||||
if cfg!(debug_assertions) {
|
||||
if cfg!(debug_assertions) || cfg!(test) {
|
||||
migrations.push(Box::new(
|
||||
m20221024_134454_insert_sample_admin::Migration::default(),
|
||||
));
|
||||
}
|
||||
|
||||
if !cfg!(test) {
|
||||
migrations.push(Box::new(m20221027_194728_session_create_user_fk::Migration));
|
||||
migrations.push(Box::new(
|
||||
m20221112_112212_create_parent_candidate_fk::Migration,
|
||||
));
|
||||
migrations.push(Box::new(
|
||||
m20221028_194728_session_create_admin_fk::Migration,
|
||||
));
|
||||
}
|
||||
|
||||
migrations
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue