diff --git a/docker-compose.yml.template b/docker-compose.yml.template index 4aef89c..29870a8 100644 --- a/docker-compose.yml.template +++ b/docker-compose.yml.template @@ -3,7 +3,7 @@ services: image: yiisoftware/yii2-php:8.3-fpm-24.3.0-nginx restart: always volumes: - - ./:/app:delegated + - ./:/app ports: - '80:80' networks: @@ -11,18 +11,19 @@ services: environment: PHP_ENABLE_XDEBUG: 1 XDEBUG_CONFIG: 'client_host=host.docker.internal client_port=9003' + db: - image: lscr.io/linuxserver/mariadb:10.11.8 + image: mysql:8.0.39-bookworm restart: always volumes: - - ./volatile/mariadb:/config + - ./volatile/db:/var networks: bankitest: aliases: - db environment: - PUID: 1000 # change me - PGID: 1000 # change me + PUID: 1000 + PGID: 1000 MYSQL_DATABASE: bankitest MYSQL_ROOT_PASSWORD: # change me MYSQL_USER: server diff --git a/migrations/m240819_084542_parameters.php b/migrations/m240819_084542_parameters.php index c3ea02c..8dde0f5 100644 --- a/migrations/m240819_084542_parameters.php +++ b/migrations/m240819_084542_parameters.php @@ -1,6 +1,6 @@ addColumn('image', 'mime', Schema::TYPE_STRING . ' NOT NULL'); + } + + /** + * {@inheritdoc} + */ + public function safeDown() + { + $this->dropColumn('table', 'mime'); + } + + /* + // Use up()/down() to run migration code without a transaction. + public function up() + { + + } + + public function down() + { + echo "m240820_024046_add_mime_to_image cannot be reverted.\n"; + + return false; + } + */ +}