()
| 217 | |
| 218 | #[tokio::main] |
| 219 | async fn main() -> async_graphql::Result<()> { |
| 220 | let config = Config::load().unwrap(); |
| 221 | env_logger::init(); |
| 222 | |
| 223 | let opts = parse_args(); |
| 224 | |
| 225 | let pool = db::db_connection(&config).await.unwrap(); |
| 226 | add_private_column_to_repos(&pool).await.unwrap(); |
| 227 | add_columns_to_organizations(&pool).await.unwrap(); |
| 228 | add_user_repositories(&pool).await.unwrap(); |
| 229 | update_repo_and_org_names(&pool).await.unwrap(); |
| 230 | update_personal_repos(&pool).await.unwrap(); |
| 231 | |
| 232 | if opts.destructive_migrations { |
| 233 | log::info!("running destructive migrations"); |
| 234 | drop_columns(&pool).await.unwrap(); |
| 235 | drop_items(&pool).await.unwrap(); |
| 236 | } |
| 237 | |
| 238 | delete_migration_records(&pool).await.unwrap(); |
| 239 | |
| 240 | log::info!("database migrated."); |
| 241 | Ok(()) |
| 242 | } |
nothing calls this directly
no test coverage detected