9 Commits

Author SHA1 Message Date
Slawomir Boczek
3f6ff3a332
Feature migrations up/down (#270)
* Migrations up down

* Add forum model

* Syntactic sugar for db structure changes

* Refactor migrations with $up & $down

* Fix migrations upgrade and downgrade

+ Add option to disable auto migrate

* Add migrate:to command

Usage: php aac migrate:to x (x - database version)

* Show error when mail is not enabled

* Fixes regarding to init.php

* Add migrate command to manually upgrade db, incase auto migrate is disabled

* Fixed rest of the migrations

* Limit max version of database

* Don't allow minus number

* Option to clear specified plugin settings by name

* Version is required

* Fix PHPStan errors

* Unset $up after migration, to prevent executing same migration twice

* Add database version to output

* This is not needed

* Update 5.php

* Set database_auto_migrate on install

* Set blank & color only if current db version supports it

* Fix duplicate function declaration
2024-11-22 15:29:23 +01:00
slawkens
7e67e11e16 More understandable argument name 2024-11-10 20:25:42 +01:00
slawkens
e2487f97e3 settings:set + settings:reset commands 2024-02-04 09:01:00 +01:00
slawkens
649e37ab0f "php aac migrate:run {ids}" command 2024-02-04 08:16:22 +01:00
slawkens
a2c8e2b2ae phpstan: level 1 passed 2024-01-31 00:36:15 +01:00
slawkens
6c4fd4ed27 add new constant for cli: SELF_NAME 2024-01-30 18:09:56 +01:00
slawkens
b517a12f8a Avoid duplicate loading of hooks 2024-01-28 23:08:37 +01:00
slawkens
5d741944f7 Fix: cronjob command 2024-01-28 23:07:40 +01:00
slawkens
410d75c882 Revised Commands -> use symfony/console -> php ma (MyAAC)
Usage:
php ma list
php ma cache:clear
php ma plugin:install guild-wars.zip

More sophisticated:
echo "Hello, this is hello world message" | php ma mail:send test@test.com --subject "This is subject"

Also: custom commands can be added via Plugins: just need to return new class instance that extends \MyAAC\Commands\Command in plugins/*/commands folder
2024-01-26 23:19:39 +01:00