Skip to content

Instantly share code, notes, and snippets.

@JoeyBodnar
Created May 12, 2018 02:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoeyBodnar/930f1cff2e2637e85216177389481943 to your computer and use it in GitHub Desktop.
Save JoeyBodnar/930f1cff2e2637e85216177389481943 to your computer and use it in GitHub Desktop.
SQLite DB usage
// Configure a SQLite database
let sqlite = try SQLiteDatabase(storage: .memory)
/// Register the configured SQLite database to the database config.
var databases = DatabasesConfig()
databases.add(database: sqlite, as: .sqlite)
services.register(databases)
/// Configure migrations
var migrations = MigrationConfig()
migrations.add(model: User.self, database: .sqlite)
services.register(migrations)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment