- refactored SchemaBuilder instantiation
- added connection name to Exceptions::QueryError
- tom added --pending option to migrate:status
- tom added --batch=X option to migrate:rollback
- docs added migrate --pending and --batch sections
- schema added ability to add table comment
- schema added ability to call comment() on SQLite
- optimized eager loading when no keys to be loaded
- dropped return value for connectEagerly()
- allowed to pass QueryBuilder to whereExists
- allowed to pass expression to pluck()
- schema added datetimes and softDeletesDatetime
- renamed to Blueprint::datetime/Tz()
- schema added withoutForeignKeyConstraints()
- added dropDatetimes() and dropSoftDeletesDatetime()
Changed from the 'schema' configuration option to the 'search_path',
the 'schema' config. option was dropped and currently throws exception
with a suggestion to use the 'search_path' instead.
The new 'search_path' config. option can be the QString or QStringList
and also supports to set an empty search_path using '' or empty QString
or QStringList.
This search_path config. option is correctly parsed and quoted.
Setting the search_path is initiated from the PostgresConnector
right after the database connection is established.
The PostgresSchemaBuilder is actively using the search_path during
practically all method calls (dropAllTables(), getColumnListing(),
hasTable(), ...). If the search_path is not defined then it queries
the database for the real search_path because the search_path can be
changed anytime and the search_path configuration option value can be
incorrect (out of sync).
It also works correctly with the empty search_path, in this case a fully
qualified table names are required. If the table name is not fully
qualified then the SearchPathEmptyError exception is thrown.
And it also works correctly with the "$user" PostgreSQL's variable, this
variable is resolved to the config["username"] during obtaining
the search_path from the database.
In the pretend mode it behaves little different, if pretending then
the 'search_path' is obtained from the connection configuration and
if the 'search_path' is not defined in the config. the 'public' will
be used as the default.
- added many new unit and functional tests which are testing all the
above described scenarios
- added new functional test case tst_PostgreSQL_SchemaBuilder_f
- added new functional test case tst_SchemaBuilder
- added new tests for dropAllTable(), dropAllViews(), hasTable(),
getColumnListing(), createDatabase(), dropDatabaseIfExists()
for ALL supported databases
- added new search_path constant
- renamed env. variable to DB_PGSQL_SEARCHPATH (from DB_PGSQL_SCHEMA)
- added new search_path and dont_drop configuration validations to
check correct type (QString or QStringList)
- added new 'schema' config. option validation
- added new exception SearchPathEmptyError
- started the TinyUtils::Databases refactor
Last two TinyORM and tom releases was about performance optimizations.
Practically no performance gain, especially in production builds,
the MSVC optimized builds are amazing.
Some perf. gain in debug builds, but only few milliseconds,
from 50-200ms, and so many perf. optimizations done. 😵💫
- bump also to TinyUtils v0.2.1 (forgotten version bump)