mirror of
https://github.com/silverqx/TinyORM.git
synced 2026-01-07 11:29:44 -06:00
tom used move for DM
This commit is contained in:
@@ -27,7 +27,7 @@ int main(int argc, char *argv[])
|
||||
// Ownership of the shared_ptr()
|
||||
auto db = setupManager();
|
||||
|
||||
return TomApplication(argc, argv, db, "TOM_EXAMPLE_ENV",
|
||||
return TomApplication(argc, argv, std::move(db), "TOM_EXAMPLE_ENV",
|
||||
QStringLiteral("migrations_example"))
|
||||
/* Default migrations path for the make:migration command, the path
|
||||
can be absolute or relative (to the pwd at runtime). */
|
||||
@@ -120,7 +120,8 @@ std::shared_ptr<DatabaseManager> setupManager()
|
||||
}
|
||||
|
||||
/* Alternative syntax to instantiate migration classes. */
|
||||
// return TomApplication(argc, argv, db, "TOM_EXAMPLE_ENV",
|
||||
// return TomApplication(argc, argv, std::move(db), "TOM_EXAMPLE_ENV",
|
||||
// QStringLiteral("migrations_table")
|
||||
// {
|
||||
// std::make_shared<CreatePostsTable>(),
|
||||
// std::make_shared<AddFactorColumnToPostsTable>(),
|
||||
|
||||
@@ -36,7 +36,7 @@ int main(int argc, char *argv[])
|
||||
// Ownership of the shared_ptr()
|
||||
auto db = setupManager();
|
||||
|
||||
return TomApplication(argc, argv, db, "TOM_TESTDATA_ENV")
|
||||
return TomApplication(argc, argv, std::move(db), "TOM_TESTDATA_ENV")
|
||||
// TODO tests, add migration for createDatabase if not exists and remove DB creation from the workflows? silverqx
|
||||
.migrations<CreateUsersTable,
|
||||
CreateRolesTable,
|
||||
|
||||
Reference in New Issue
Block a user