feat: run migrations before init
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
7e50f9be0d
commit
bb0b6ef597
2 changed files with 1 additions and 3 deletions
|
@ -14,14 +14,11 @@
|
|||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
use std::collections::HashMap;
|
||||
|
||||
use actix_web::{web, HttpResponse, Responder};
|
||||
use actix_web_httpauth::middleware::HttpAuthentication;
|
||||
use libforms::*;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::db::FormSubmission;
|
||||
use crate::errors::*;
|
||||
use crate::AppCtx;
|
||||
use crate::*;
|
||||
|
|
|
@ -115,6 +115,7 @@ async fn main() -> std::io::Result<()> {
|
|||
|
||||
async fn serve(settings: Settings, ctx: AppCtx) -> std::io::Result<()> {
|
||||
let ip = settings.server.get_ip();
|
||||
ctx.db.migrate().await.unwrap();
|
||||
println!("Starting server on: http://{ip}");
|
||||
|
||||
HttpServer::new(move || {
|
||||
|
|
Loading…
Reference in a new issue