Commit Graph

369 Commits

Author SHA1 Message Date
silverqx
c6f06d6280 bugfix disable testdata_tom if tom disabled 2022-06-08 15:58:10 +02:00
silverqx
9f5926f1ee bump version to TinyUtils v0.2.0 2022-06-07 11:26:06 +02:00
silverqx
db5232a22f bump TinyORM v0.4.5, tom v0.2.2, TinyUtils v0.1.1 2022-06-05 13:43:49 +02:00
silverqx
1d24bf1cea fixed unused variable warning in static build 2022-06-04 16:28:12 +02:00
silverqx
43335a6ca4 updated conf.pri.example/s
[skip ci]
2022-06-04 15:10:52 +02:00
silverqx
4b203f8fac workaround qmake bug moc_predefs.h with clang-cl
[skip ci]
2022-06-04 15:10:52 +02:00
silverqx
4f1c931eae added support for clang-cl
Be able to build with clang-cl with MSVC 2019/2022 but only with
inline constants.

 - supported by both CMake and qmake 🎉
 - updated docs support compilers

qmake specific:

 - enhanced and fixed tiny_toolchain_requirement
 - added clang-cl min. required version to tiny_toolchain_requirement
 - enhanced winconf.pri
 - updated conf.pri.examples
 - added a new feature file the tiny_system_headers.prf, it unifies
   tagging system headers

cmake specific:

 - also added clang-cl min. required version as minReqClangClVersion
 - for clang-cl set the INLINE_CONSTANTS to ON and don't show this
   CMake option
2022-06-04 09:23:53 +02:00
silverqx
9b67c98cec qmake variable renamed to TINY_BUILD_SUBFOLDER
[skip ci]
2022-06-02 17:00:16 +02:00
silverqx
de38d4213f renamed c macro to TINYORM_USING_PCH
- also added this macro to docs
2022-06-01 21:04:09 +02:00
silverqx
bf27133ffc enhanced escaping of special characters
Enhanced escaping of special characters in the schema builder.

 - added note to the docs
 - added unit tests
2022-06-01 19:17:43 +02:00
silverqx
1cf67bc49d updated comment
[skip ci]
2022-05-26 09:51:51 +02:00
silverqx
70a62730bb updated comment
[skip ci]
2022-05-25 19:06:33 +02:00
silverqx
2d3bfb0083 renamed dotenv example files
[skip ci]
2022-05-25 13:58:58 +02:00
silverqx
b781b78e35 bugfix © in RC file for msvc Qt6 🤬 2022-05-25 11:47:53 +02:00
silverqx
b623f208c1 used Q_SLOTS 2022-05-24 23:31:33 +02:00
silverqx
209c0bb6fa clazy enabled no-ctor-missing-parent-argument
Enabled no-ctor-missing-parent-argument clazy check.
2022-05-24 20:22:19 +02:00
silverqx
2cb8bb9b4b use tom migrations in unit tests for PostgreSQL 💪
- added fixPostgresSequences() to our tom seeder
 - added PostgreSQL connection to tom_testdata
 - updated msvc workflow
 - tom, throw if empty connection only if exactly one connection
   provided
 - also updated create_and_seed_database.php script to exclude postgres
   connection using --skip-postgres-migrate command-line parameter
2022-05-23 16:11:30 +02:00
silverqx
0bcbcd2431 added support for PostgreSQL schema builder 🎉👌
- 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
2022-05-23 10:14:25 +02:00
silverqx
767b369148 removed unnecessary autoIncrement() call 2022-05-23 09:14:47 +02:00
silverqx
3303e5582a updated comment 2022-05-23 09:14:04 +02:00
silverqx
82cf2ea7c0 don't include models if disable_orm 2022-05-23 08:25:37 +02:00
silverqx
74e8078897 added todo task 2022-05-18 14:14:39 +02:00
silverqx
54e3613a98 added a new TZ00 string constant
- used everywhere
 - updated docs
2022-05-18 09:57:06 +02:00
silverqx
488037b33a used our seeder in workflows 🎉💪 2022-05-18 09:40:45 +02:00
silverqx
bce94ade1f enhanced TinyUtils library
- whitespaces
 - exception messages
 - used EMPTY constant
2022-05-18 09:23:15 +02:00
silverqx
158f833293 updated error message 2022-05-18 09:01:23 +02:00
silverqx
28067cc10f whitespace 2022-05-17 17:15:05 +02:00
silverqx
5524407a23 whitespaces 2022-05-17 17:10:31 +02:00
silverqx
8471ea6608 removed public specifier from seeders 2022-05-17 13:41:43 +02:00
silverqx
cf8f3e651c renamed seeder classes to singular 2022-05-17 08:30:01 +02:00
silverqx
48947bf3d2 added docs for seeding 📃 2022-05-16 21:04:32 +02:00
silverqx
d4557fc705 added database seeder 🔥🎉
The db:seed command invokes the root seeder DatabaseSeeder which can
invoke another seeders using the call() related methods. The root seeder
can be set by the --class command-line option and also by the --seeder
cmd. line option on some other commands like migrate:fresh/refresh.

Seeders can be passed to the Tom application in the similar way like the
migrations using the TomApplication::seeders<>() method or through the
constructor.

Arguments can be passed to the call<>() method, then the seeders run()
method will not be called using the virtual dispatch but using the type
traits. Of course the arguments passed to the call<>() method has to
match with the run() method parameters.

Others:

 - unified usingConnection() across all commands, this functionality was
   extracted to own class, previous it was a part of the Migrator class,
   so now every command even if it doesn't use Migrator can call
   the usingConnection() and it correctly sets a default connection and
   SQL queries debugging on the base of the -vvv command-line argument
 - a default database connection is now required, if not set then
   the exception will be thrown
 - added example seeders to the Tom application
2022-05-16 14:25:29 +02:00
silverqx
bf44d45573 added commented code 2022-05-16 10:22:26 +02:00
silverqx
9a06a5a92f cmake used absolute path 2022-05-12 16:11:46 +02:00
silverqx
da9608202d avoid migrations table names collision
tom example, main unit tests migrations and migrations table used during
unit testing have different names.
2022-05-12 13:52:23 +02:00
silverqx
2d0212f9c1 added TOM_TESTS_ENV to tst_migrate 2022-05-12 13:38:49 +02:00
silverqx
407c389cc8 added a new tom related env. variables to dotfiles 2022-05-12 13:38:11 +02:00
silverqx
285f654278 bugfix in skip-mysql-migrate condition 2022-05-12 13:01:11 +02:00
silverqx
3b05cd1bed used own tom migrations in unit tests 🎉 2022-05-12 12:25:22 +02:00
silverqx
b816c932dc removed unused code 2022-05-12 10:20:02 +02:00
silverqx
923d54567e cmake removed useless BUILD_INTERFACE 2022-05-10 16:08:45 +02:00
silverqx
2a43df8afe fixed clang-tidy warning on linux 2022-05-06 16:55:40 +02:00
silverqx
f7bbd743f5 fixed globals in tests
[skip ci]
2022-05-05 22:02:36 +02:00
silverqx
ffe1572cf5 used Tom_target in the tom.rc.in 2022-05-05 14:09:29 +02:00
silverqx
316b716a0b prepare migrations table in tst_migrate 2022-05-05 10:51:25 +02:00
silverqx
2f455f7f4a fixed RC files encoding on Windows 🙌🎆
Use utf8 on MinGW and ANSI with msvc.

The core of the problem is in the $$cat() and write_file() qmake
functions they don't know process UTF-8 encoded files, they use
the ANSI encoding.
2022-05-05 10:31:29 +02:00
silverqx
b3105e0135 fixed RC file encoding problem (workaround) 2022-05-04 18:52:00 +02:00
silverqx
08c41ba9bd added new constant for utf80900 encoding 2022-05-04 10:56:28 +02:00
silverqx
c8976aaf11 udpated comment 2022-05-03 09:49:39 +02:00
silverqx
98c61891c3 enhanced migration classes naming
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
2022-05-02 10:59:30 +02:00