♻️ refactor: reorganize

This commit is contained in:
Dominic Harris 2022-04-05 08:37:42 -04:00
parent 622c93cab4
commit 4df76b44a5
No known key found for this signature in database
GPG Key ID: 93CCF85F3E2A4F65
1 changed files with 0 additions and 16 deletions

View File

@ -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(())