-- Initialization --------------------------------------------------------------

-- | Create tables in the database, if it's freshly created.
initDb :: Din ()
initDb  = do
  isFresh <- freshDb
  logDebug ("Fresh database: " ++ show isFresh)
  when isFresh (mapM_ createTable dinSchema)

-- | Given a specification, create a table in the database.
initDb :: Din ()
initDb  = do
  isFresh <- freshDb
  logDebug ("Fresh database: " ++ show isFresh)
  when isFresh (mapM_ createTable dinSchema)

-- | Given a specification, create a table in the database.
initDb  = do
  isFresh <- freshDb
  logDebug ("Fresh database: " ++ show isFresh)
  when isFresh (mapM_ createTable dinSchema)

-- | Given a specification, create a table in the database.