-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
I am running through week 9, and I couldn't figure out where we should be loading the connection and configuration for that connection in regards to migrations.lisp.
If I call migrate it doesn't have a connection, right? What am I missing? It seems a bit different from the migrations.main in ningle-tutorial-project because that project now uses contrib.lisp.
(defpackage ningle-auth/migrations
(:use :cl :mito)
(:export #:migrate))
(in-package :ningle-auth/migrations)
(defun migrate ()
"Explicitly apply migrations when called."
(format t "Applying migrations...~%")
(mito:ensure-table-exists 'ningle-auth/models:user)
(mito:ensure-table-exists 'ningle-auth/models:role)
(mito:ensure-table-exists 'ningle-auth/models:permission)
(mito:ensure-table-exists 'ningle-auth/models:token)
(mito:migrate-table 'ningle-auth/models:user)
(mito:migrate-table 'ningle-auth/models:role)
(mito:migrate-table 'ningle-auth/models:permission)
(mito:migrate-table 'ningle-auth/models:token)
(create-dao 'ningle-auth/models:role :name "admin" :description "Admin")
(create-dao 'ningle-auth/models:role :name "user" :description "User")
(format t "Migrations complete.~%"))
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels