- added a new config. option dont_drop, allows to define table that
will be excluded during dropAllTables(), has a default value
spatial_ref_sys for PostGIS
- implemented fluent commands, used only by the PostgreSQL Comment
command
- added tests for PostgreSQL schema builder
- reworked tst_Migrate to be able to run on all supported connections,
currently PostgreSQL and MySQL
- updated docs
Unrelated:
- added a new reference class IndexDefinitionReference for a nice API
during index definition, contains algorithm and language
- unified selectFromWriteConnection() in schema builders
Extracting these guard related methods to own class allows to call
GuardedModel::unguarded() regardless of a template parameters needed
on the Model class, before was needed to call
Model<Torrent, Relations..>::unguarded().
- also made the g_unguarded atomic
- bugfix reguard() try-catch-finally in GuardedModel::unguarded()
They can now also set up include directories and link against
the TinyORM library. It's accomplished by the TINYORM_BUILD_TREE
variable.
- also updated all examples in the documentation
- manually tried to recompile all the examples on all supported
platforms
- enhanced tiny_version_numbers.prf, throw error when the version file
was not found or when the parsing failed
- used qmake/common.pri in the TinyOrm.pri and tom.pri,
the consequences are that the user can use eg "CONFIG += disable_orm"
and all others supported qmake configurations on his own project, so
if the TinyORM was compiled with some set of flags then the same set
of flags has to be used on the compiled project, CMake is doing this
automatically of course
- added Configure using .qmake.conf to the hello world example
Enhanced migration name detection for the make:migration, practically
all the possible combinations are allowed and handled correctly 👀😎.
Now is possible to pass the full migration name with the datetime prefix
and with the filename extension. All possible combinations are
supported.
Summarize, so an user can pass:
- classname that will be converted to the studly case
- filename without the datetime prefix (with or w/o extension)
- filename with the datetime prefix (with or w/o extension)
Migration classes can be named in two formats, CamelCase without the
datetime prefix and snake_case with the datetime prefix.
If the CamelCase name is used then the T_MIGRATION macro has to be
also used in the migration class.
- also added a new validations of the migration class names
- different render format for options with values --env[=ENV]
- printing a default value part after the description
- added some validations for option names, especially validate the size
- fixed default value name in all commands, it should be upper
Created own tomconstants for the Tom namespace (folder tom/) and used
them everywhere.
Others:
- removed Q_GLOBAL_STATIC_WITH_ARGS() in migrationcreator.cpp and used
getter with the local static const
User can provide a custom migrations path for the make:migration
command.
Default path is at database/migrations relative to the tom example
executable.
This allows to use the tom example as a real migration application and
the user doesn't have to create his own migration project.
Using:
- TomApplication::migrationsPath()
- TINYTOM_MIGRATIONS_PATH preprocessor macro, will be stringified
- TOM_MIGRATIONS_PATH CMake PATH option
Only partial names no matter of case can be passed, eg. mi:st for
the migrate:status, or m for the migrate command.
If the passed name is ambiguous then the error wall with all ambiguous
commands or namespaces is displayed, ambiguous commands also contain
a description.
Following positional arguments support guessing:
- main command name at 0 position
- command name passed to the help command
- namespace name passed to the list command
Commands in the blueprint don't have virtual dtors, they are not
polymorphic, so shared_ptr has to be used because it can correctly
destroy these aggregates.
Commands in the blueprint don't have virtual dtors, they are not
polymorphic, so shared_ptr has to be used because it can correctly
destroy these aggregates.