mirror of https://github.com/zer0bin-dev/zer0bin
♻️ refactor: reorganize
This commit is contained in:
parent
622c93cab4
commit
4df76b44a5
|
@ -41,22 +41,6 @@ pub async fn migrations(pool: &PgPool) -> Result<(), sqlx::Error> {
|
|||
3. Run `INSERT INTO pastes SELECT * from old_pastes;` and `DROP TABLE old_pastes;` in PSQL
|
||||
*/
|
||||
|
||||
// TODO: This is a hacky solution but it works for now
|
||||
// it doesnt work lol
|
||||
// if let Err(e) = migrator.run(pool).await {
|
||||
// match e {
|
||||
// Execute(ex) => {
|
||||
// // If the error comes from a table exists check then we can return Ok
|
||||
// if ex.as_database_error().unwrap().code().unwrap() == "42710" {
|
||||
// return Ok(())
|
||||
// }
|
||||
// },
|
||||
// _ => {
|
||||
// return Err(e.into());
|
||||
// }
|
||||
// }
|
||||
// };
|
||||
|
||||
migrator.run(pool).await?;
|
||||
|
||||
Ok(())
|
||||
|
|
Loading…
Reference in New Issue