chg: pkg: update the vite related stuff because CORS and React errors - reinit the miration #4
This commit is contained in:
@@ -1,42 +0,0 @@
|
|||||||
<?php declare(strict_types=1);
|
|
||||||
/*
|
|
||||||
* This file is part of the SplendidBear Websites' projects.
|
|
||||||
*
|
|
||||||
* Copyright (c) 2026 @ www.splendidbear.org
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE
|
|
||||||
* file that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace App\Migrations;
|
|
||||||
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
|
||||||
use Doctrine\Migrations\AbstractMigration;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class Version20260409194708
|
|
||||||
*
|
|
||||||
* @package App\Migrations
|
|
||||||
* @author Lang <https://www.splendidbear.org>
|
|
||||||
* @category Class
|
|
||||||
* @license https://www.gnu.org/licenses/lgpl-3.0.en.html GNU Lesser General Public License
|
|
||||||
* @link www.splendidbear.org
|
|
||||||
* @since 2026. 04. 09.
|
|
||||||
*/
|
|
||||||
final class Version20260409194708 extends AbstractMigration
|
|
||||||
{
|
|
||||||
public function getDescription(): string
|
|
||||||
{
|
|
||||||
return 'Refactor entities';
|
|
||||||
}
|
|
||||||
|
|
||||||
public function up(Schema $schema): void
|
|
||||||
{
|
|
||||||
$this->addSql('ALTER TABLE step RENAME COLUMN wbomb TO w_bomb');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function down(Schema $schema): void
|
|
||||||
{
|
|
||||||
$this->addSql('ALTER TABLE step RENAME COLUMN w_bomb TO wbomb');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,12 +1,6 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
/*
|
|
||||||
* This file is part of the SplendidBear Websites' projects.
|
declare(strict_types=1);
|
||||||
*
|
|
||||||
* Copyright (c) 2026 @ www.splendidbear.org
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE
|
|
||||||
* file that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace App\Migrations;
|
namespace App\Migrations;
|
||||||
|
|
||||||
@@ -14,24 +8,25 @@ use Doctrine\DBAL\Schema\Schema;
|
|||||||
use Doctrine\Migrations\AbstractMigration;
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Version20260409175831
|
* Class Version20260411133016
|
||||||
*
|
*
|
||||||
* @package App\Migrations
|
* @package App\Migrations
|
||||||
* @author Lang <https://www.splendidbear.org>
|
* @author Lang <https://www.splendidbear.org>
|
||||||
* @category Class
|
* @category Class
|
||||||
* @license https://www.gnu.org/licenses/lgpl-3.0.en.html GNU Lesser General Public License
|
* @license https://www.gnu.org/licenses/lgpl-3.0.en.html GNU Lesser General Public License
|
||||||
* @link www.splendidbear.org
|
* @link www.splendidbear.org
|
||||||
* @since 2026. 04. 09.
|
* @since 2026. 04. 11.
|
||||||
*/
|
*/
|
||||||
final class Version20260409175831 extends AbstractMigration
|
final class Version20260411133016 extends AbstractMigration
|
||||||
{
|
{
|
||||||
public function getDescription(): string
|
public function getDescription(): string
|
||||||
{
|
{
|
||||||
return 'Initialize the database for 2026';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema): void
|
||||||
{
|
{
|
||||||
|
// this up() migration is auto-generated, please modify it to your needs
|
||||||
$this->addSql('CREATE SEQUENCE gamer_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
$this->addSql('CREATE SEQUENCE gamer_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||||
$this->addSql('CREATE SEQUENCE grid_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
$this->addSql('CREATE SEQUENCE grid_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||||
$this->addSql('CREATE SEQUENCE grid_row_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
$this->addSql('CREATE SEQUENCE grid_row_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||||
@@ -48,7 +43,7 @@ final class Version20260409175831 extends AbstractMigration
|
|||||||
$this->addSql('CREATE INDEX IDX_54BE8039F24372EB ON played_game (red_anon)');
|
$this->addSql('CREATE INDEX IDX_54BE8039F24372EB ON played_game (red_anon)');
|
||||||
$this->addSql('CREATE INDEX IDX_54BE80395AB9393F ON played_game (blue_id)');
|
$this->addSql('CREATE INDEX IDX_54BE80395AB9393F ON played_game (blue_id)');
|
||||||
$this->addSql('CREATE INDEX IDX_54BE8039C64E7C7C ON played_game (blue_anon)');
|
$this->addSql('CREATE INDEX IDX_54BE8039C64E7C7C ON played_game (blue_anon)');
|
||||||
$this->addSql('CREATE TABLE step (id INT NOT NULL, played_game_id INT DEFAULT NULL, row INT NOT NULL, col INT NOT NULL, w_bomb BOOLEAN DEFAULT NULL, created TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, PRIMARY KEY(id))');
|
$this->addSql('CREATE TABLE step (id INT NOT NULL, played_game_id INT DEFAULT NULL, row INT NOT NULL, col INT NOT NULL, w_bomb BOOLEAN DEFAULT NULL, player VARCHAR(10) DEFAULT NULL, revealed_cells JSON DEFAULT NULL, created TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, PRIMARY KEY(id))');
|
||||||
$this->addSql('CREATE INDEX IDX_43B9FE3C5AA11DBB ON step (played_game_id)');
|
$this->addSql('CREATE INDEX IDX_43B9FE3C5AA11DBB ON step (played_game_id)');
|
||||||
$this->addSql('CREATE TABLE "user" (id INT NOT NULL, username VARCHAR(180) NOT NULL, roles JSON NOT NULL, password VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id))');
|
$this->addSql('CREATE TABLE "user" (id INT NOT NULL, username VARCHAR(180) NOT NULL, roles JSON NOT NULL, password VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id))');
|
||||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_8D93D649F85E0677 ON "user" (username)');
|
$this->addSql('CREATE UNIQUE INDEX UNIQ_8D93D649F85E0677 ON "user" (username)');
|
||||||
@@ -63,6 +58,7 @@ final class Version20260409175831 extends AbstractMigration
|
|||||||
|
|
||||||
public function down(Schema $schema): void
|
public function down(Schema $schema): void
|
||||||
{
|
{
|
||||||
|
// this down() migration is auto-generated, please modify it to your needs
|
||||||
$this->addSql('DROP SEQUENCE gamer_id_seq CASCADE');
|
$this->addSql('DROP SEQUENCE gamer_id_seq CASCADE');
|
||||||
$this->addSql('DROP SEQUENCE grid_id_seq CASCADE');
|
$this->addSql('DROP SEQUENCE grid_id_seq CASCADE');
|
||||||
$this->addSql('DROP SEQUENCE grid_row_id_seq CASCADE');
|
$this->addSql('DROP SEQUENCE grid_row_id_seq CASCADE');
|
||||||
@@ -37,5 +37,5 @@
|
|||||||
|
|
||||||
{% block javascripts %}
|
{% block javascripts %}
|
||||||
{{ parent() }}
|
{{ parent() }}
|
||||||
{{ vite_entry_script_tags('mineseeker') }}
|
{{ vite_entry_script_tags('mineseeker', { dependency: 'react' }) }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -28,6 +28,11 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
server: {
|
||||||
|
cors: {
|
||||||
|
origin: ['https://mine.local', 'http://mine.local'],
|
||||||
|
},
|
||||||
|
},
|
||||||
css: {
|
css: {
|
||||||
preprocessorOptions: {
|
preprocessorOptions: {
|
||||||
scss: {
|
scss: {
|
||||||
|
|||||||
Reference in New Issue
Block a user