From a7cc24b73a298c271bba8c5f526c3a962a0aaca3 Mon Sep 17 00:00:00 2001 From: nek0 Date: Mon, 1 Feb 2021 02:24:41 +0100 Subject: [PATCH] rename main module of executable --- app/{Main.hs => AppMain.hs} | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) rename app/{Main.hs => AppMain.hs} (94%) diff --git a/app/Main.hs b/app/AppMain.hs similarity index 94% rename from app/Main.hs rename to app/AppMain.hs index 7e9f077..ea0ad87 100644 --- a/app/Main.hs +++ b/app/AppMain.hs @@ -3,7 +3,7 @@ {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} -module Main where +module AppMain where import Prelude as P @@ -45,6 +45,7 @@ import System.Exit -- internal imports import API +import Util (initDB) import Model as M import AppTypes @@ -93,16 +94,7 @@ main = do void $ do runMigration $ MigrationContext MigrationInitialization True conn - execute_ conn initAvatar - execute_ conn initUser - execute_ conn initProduct - execute_ conn initToken - execute_ conn initAuthData - execute_ conn initAmount - execute_ conn initJournal - execute_ conn initRole - execute_ conn initUserToRole - void $ runInsertInitialRoles conn + initDB conn -- validate Migrations let migLoc = T.unpack tMigLoc ok <- withTransaction conn $ runMigration $ MigrationContext