Files
TinyORM/include/include.pri
silverqx a6213a6a9d added migrations 🔥🚀
Almost everything is implemented, possible to migrate up, down
(rollback), migrate by steps (works for up/down too), reset, refresh,
fresh, wipe database, showing status, installing migration table.

Command line interface is superb, it supports ansi coloring, verbosity,
no-interactive mode, force option, env option to select current env.

It has enhanced ansi coloring (vt100 terminal) detection, when ansi or
no-ansi option is not passed it can detect whether terminal supports
coloring.
Ansi coloring is disabled when redirection to file is detected (can
be overridden by ansi/no-ansi options).
Supports NO_COLOR env. variable (https://no-color.org/) and can detect
the ConEmu, Hyper, and xterm on Windows.

Carefully implemented help and list commands, list command can print
supported commands by namespace.

Advanced make migration command offers great command interface for
creating migration classes, supports options for generating empty,
create, or update migration classes.

Unfinished make project command, will support creating qmake, qmake
subproject, and cmake, cmake subproject projects. Later will be
extracted to own executable tomproject.exe for rapidly generating a new
TinyORM projects.

Other implemented commands are env that prints current env. and inspire
that displays an inspiring quote 😁.

Verbose supports 5 levels quiet, normal, verbose, very verbose, and
debug.

Possibility to disable compilation of the tom command related code using
TINYORM_DISABLE_TOM c macro, for the qmake exists disable_tom CONFIG
option and for the CMake exist TOM configuration option.

Confirmable interface that ask Y/N confirmation during migrate when
env. == production, can be overridden by --force option.

Whole tom terminal application supports or is implemented with UTF-8
support, also implemented UTF-16 output methods but they are not needed.
Input also supports UTF-8, currently only Y/N input is needed by the
Confirmation concern.

All migrate commands also support the --pretend option and the --env
option, when env. is production then tom asks confirmation to migrate,
it can be overridden by the --force option.

Added the tom example project, it is a complete command-line migration
application, it uses migrations from the tests.

Implementing this was really fun 🙃😎.

 - added 14 functional tests to test migrations up/down, stepping,
   installing migration table, refresh, reset on MySQL database
 - added unit test to check version number in tom.exe executable
 - new tom exception classes
 - created dozens of a new todo tasks 😂🤪, currently 348 todos 😎
 - added some info messages to the qmake build about building features
 - in the debug build and with the -vvv option enable debugging of sql
   queries
 - enhanced RC and manifest file generation, allowed to pass a custom
   basename for a RC/manifest file as the 3. argument and a custom
   replace token for the CMake genex as the 4. argument
 - bugfix disabled #pragma code_page(65001) // UTF-8 in RC files, it
   messes up the © character

Output of tom exe without arguments and options:

Common options:
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
      --env             The environment the command should run under
  -h, --help            Display help for the given command. When no
                        command is given display help for the list
                        command
  -n, --no-interaction  Do not ask any interactive question
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal
                        output, 2 for more verbose output and
                        3 for debug

Available commands:
  env                   Display the current framework environment
  help                  Display help for a command
  inspire               Display an inspiring quote
  list                  List commands
  migrate               Run the database migrations
 db
  db:wipe               Drop all tables, views, and types
 make
  make:migration        Create a new migration file
  make:project          Create a new Tom application project
 migrate
  migrate:fresh         Drop all tables and re-run all migrations
  migrate:install       Create the migration repository
  migrate:refresh       Rollback and re-run all migrations
  migrate:reset         Rollback all database migrations
  migrate:rollback      Rollback the last database migration
  migrate:status        Show the status of each migration
2022-04-20 15:45:35 +02:00

137 lines
5.5 KiB
Plaintext

INCLUDEPATH += $$PWD
extern_constants: \
headersList += \
$$PWD/orm/constants_extern.hpp \
$$PWD/orm/schema/schemaconstants_extern.hpp
else: \
headersList += \
$$PWD/orm/constants_inline.hpp \
$$PWD/orm/schema/schemaconstants_inline.hpp
headersList += \
$$PWD/orm/basegrammar.hpp \
$$PWD/orm/concerns/countsqueries.hpp \
$$PWD/orm/concerns/detectslostconnections.hpp \
$$PWD/orm/concerns/hasconnectionresolver.hpp \
$$PWD/orm/concerns/logsqueries.hpp \
$$PWD/orm/concerns/managestransactions.hpp \
$$PWD/orm/config.hpp \
$$PWD/orm/connectionresolverinterface.hpp \
$$PWD/orm/connectors/connectionfactory.hpp \
$$PWD/orm/connectors/connector.hpp \
$$PWD/orm/connectors/connectorinterface.hpp \
$$PWD/orm/connectors/mysqlconnector.hpp \
$$PWD/orm/connectors/postgresconnector.hpp \
$$PWD/orm/connectors/sqliteconnector.hpp \
$$PWD/orm/constants.hpp \
$$PWD/orm/databaseconnection.hpp \
$$PWD/orm/databasemanager.hpp \
$$PWD/orm/db.hpp \
$$PWD/orm/exceptions/domainerror.hpp \
$$PWD/orm/exceptions/invalidargumenterror.hpp \
$$PWD/orm/exceptions/invalidformaterror.hpp \
$$PWD/orm/exceptions/invalidtemplateargumenterror.hpp \
$$PWD/orm/exceptions/logicerror.hpp \
$$PWD/orm/exceptions/ormerror.hpp \
$$PWD/orm/exceptions/queryerror.hpp \
$$PWD/orm/exceptions/runtimeerror.hpp \
$$PWD/orm/exceptions/sqlerror.hpp \
$$PWD/orm/exceptions/sqltransactionerror.hpp \
$$PWD/orm/libraryinfo.hpp \
$$PWD/orm/macros/archdetect.hpp \
$$PWD/orm/macros/commonnamespace.hpp \
$$PWD/orm/macros/compilerdetect.hpp \
$$PWD/orm/macros/export.hpp \
$$PWD/orm/macros/export_common.hpp \
$$PWD/orm/macros/likely.hpp \
$$PWD/orm/macros/logexecutedquery.hpp \
$$PWD/orm/macros/systemheader.hpp \
$$PWD/orm/macros/threadlocal.hpp \
$$PWD/orm/mysqlconnection.hpp \
$$PWD/orm/ormconcepts.hpp \
$$PWD/orm/ormtypes.hpp \
$$PWD/orm/postgresconnection.hpp \
$$PWD/orm/query/expression.hpp \
$$PWD/orm/query/grammars/grammar.hpp \
$$PWD/orm/query/grammars/mysqlgrammar.hpp \
$$PWD/orm/query/grammars/postgresgrammar.hpp \
$$PWD/orm/query/grammars/sqlitegrammar.hpp \
$$PWD/orm/query/joinclause.hpp \
$$PWD/orm/query/processors/mysqlprocessor.hpp \
$$PWD/orm/query/processors/postgresprocessor.hpp \
$$PWD/orm/query/processors/processor.hpp \
$$PWD/orm/query/processors/sqliteprocessor.hpp \
$$PWD/orm/query/querybuilder.hpp \
$$PWD/orm/schema.hpp \
$$PWD/orm/schema/blueprint.hpp \
$$PWD/orm/schema/columndefinition.hpp \
$$PWD/orm/schema/columndefinitionreference.hpp \
$$PWD/orm/schema/foreignidcolumndefinitionreference.hpp \
$$PWD/orm/schema/foreignkeydefinitionreference.hpp \
$$PWD/orm/schema/grammars/mysqlschemagrammar.hpp \
$$PWD/orm/schema/grammars/postgresschemagrammar.hpp \
$$PWD/orm/schema/grammars/schemagrammar.hpp \
$$PWD/orm/schema/grammars/sqliteschemagrammar.hpp \
$$PWD/orm/schema/mysqlschemabuilder.hpp \
$$PWD/orm/schema/postgresschemabuilder.hpp \
$$PWD/orm/schema/schemabuilder.hpp \
$$PWD/orm/schema/schemaconstants.hpp \
$$PWD/orm/schema/schematypes.hpp \
$$PWD/orm/schema/sqliteschemabuilder.hpp \
$$PWD/orm/sqliteconnection.hpp \
$$PWD/orm/support/configurationoptionsparser.hpp \
$$PWD/orm/support/databaseconfiguration.hpp \
$$PWD/orm/support/databaseconnectionsmap.hpp \
$$PWD/orm/types/log.hpp \
$$PWD/orm/types/statementscounter.hpp \
$$PWD/orm/utils/container.hpp \
$$PWD/orm/utils/fs.hpp \
$$PWD/orm/utils/query.hpp \
$$PWD/orm/utils/thread.hpp \
$$PWD/orm/utils/type.hpp \
$$PWD/orm/version.hpp \
!disable_orm: \
headersList += \
$$PWD/orm/tiny/concerns/guardsattributes.hpp \
$$PWD/orm/tiny/concerns/hasattributes.hpp \
$$PWD/orm/tiny/concerns/hasrelationships.hpp \
$$PWD/orm/tiny/concerns/hasrelationstore.hpp \
$$PWD/orm/tiny/concerns/hastimestamps.hpp \
$$PWD/orm/tiny/concerns/queriesrelationships.hpp \
$$PWD/orm/tiny/exceptions/massassignmenterror.hpp \
$$PWD/orm/tiny/exceptions/modelnotfounderror.hpp \
$$PWD/orm/tiny/exceptions/relationnotfounderror.hpp \
$$PWD/orm/tiny/exceptions/relationnotloadederror.hpp \
$$PWD/orm/tiny/macros/crtpmodel.hpp \
$$PWD/orm/tiny/macros/crtpmodelwithbase.hpp \
$$PWD/orm/tiny/model.hpp \
$$PWD/orm/tiny/modelproxies.hpp \
$$PWD/orm/tiny/relations/basepivot.hpp \
$$PWD/orm/tiny/relations/belongsto.hpp \
$$PWD/orm/tiny/relations/belongstomany.hpp \
$$PWD/orm/tiny/relations/concerns/supportsdefaultmodels.hpp \
$$PWD/orm/tiny/relations/hasmany.hpp \
$$PWD/orm/tiny/relations/hasone.hpp \
$$PWD/orm/tiny/relations/hasoneormany.hpp \
$$PWD/orm/tiny/relations/pivot.hpp \
$$PWD/orm/tiny/relations/relation.hpp \
$$PWD/orm/tiny/relations/relationproxies.hpp \
$$PWD/orm/tiny/relations/relationtypes.hpp \
$$PWD/orm/tiny/tinybuilder.hpp \
$$PWD/orm/tiny/tinybuilderproxies.hpp \
$$PWD/orm/tiny/tinyconcepts.hpp \
$$PWD/orm/tiny/tinytypes.hpp \
$$PWD/orm/tiny/types/connectionoverride.hpp \
$$PWD/orm/tiny/types/syncchanges.hpp \
$$PWD/orm/tiny/utils/attribute.hpp \
!disable_orm|!disable_tom: \
headersList += \
$$PWD/orm/tiny/utils/string.hpp \
HEADERS += $$sorted(headersList)
unset(headersList)