From 804ed76f4ca611a7dd1fd372b3c8180db5e36e62 Mon Sep 17 00:00:00 2001 From: Rostislav Vitek Date: Tue, 19 Nov 2024 09:21:21 +0100 Subject: [PATCH] move Version20240902171506 migration to the proper namespace --- src/Migrations/Version20240902171506.php | 31 ++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/Migrations/Version20240902171506.php diff --git a/src/Migrations/Version20240902171506.php b/src/Migrations/Version20240902171506.php new file mode 100644 index 0000000000..7b5f70e2a8 --- /dev/null +++ b/src/Migrations/Version20240902171506.php @@ -0,0 +1,31 @@ +sql('ALTER TABLE transport_prices ADD max_weight INT DEFAULT NULL'); + $this->sql('UPDATE transport_prices SET max_weight = (SELECT max_weight FROM transports WHERE transports.id = transport_prices.transport_id)'); + + $this->sql('ALTER TABLE transport_prices DROP CONSTRAINT transport_prices_pkey'); + $this->sql('ALTER TABLE transport_prices ADD id SERIAL NOT NULL'); + $this->sql('ALTER TABLE transport_prices ADD PRIMARY KEY (id)'); + } + + /** + * @param \Doctrine\DBAL\Schema\Schema $schema + */ + public function down(Schema $schema): void + { + } +}