chore: initial import for test contour with k3s CI
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20250905084451 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('DROP SEQUENCE calltouch_id_seq CASCADE');
|
||||
$this->addSql('DROP SEQUENCE calltouch_direct_id_seq CASCADE');
|
||||
$this->addSql('DROP SEQUENCE calltouch_map_visit_id_seq CASCADE');
|
||||
$this->addSql('DROP SEQUENCE calltouch_order_id_seq CASCADE');
|
||||
$this->addSql('DROP SEQUENCE calltouch_session_id_seq CASCADE');
|
||||
$this->addSql('DROP SEQUENCE calltouch_webhook_orm_id_seq CASCADE');
|
||||
$this->addSql('ALTER TABLE calltouch_session DROP CONSTRAINT fk_6ce17ff773c45666');
|
||||
$this->addSql('ALTER TABLE calltouch DROP CONSTRAINT fk_9c123ab5a76ed395');
|
||||
$this->addSql('ALTER TABLE calltouch_order DROP CONSTRAINT fk_d09e836573c45666');
|
||||
$this->addSql('ALTER TABLE calltouch_direct DROP CONSTRAINT fk_e33e2cff73c45666');
|
||||
$this->addSql('ALTER TABLE calltouch_map_visit DROP CONSTRAINT fk_4b22276773c45666');
|
||||
$this->addSql('DROP TABLE calltouch_session');
|
||||
$this->addSql('DROP TABLE calltouch');
|
||||
$this->addSql('DROP TABLE calltouch_order');
|
||||
$this->addSql('DROP TABLE calltouch_direct');
|
||||
$this->addSql('DROP TABLE calltouch_map_visit');
|
||||
$this->addSql('DROP TABLE calltouch_webhook');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE SCHEMA public');
|
||||
$this->addSql('CREATE SEQUENCE calltouch_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||
$this->addSql('CREATE SEQUENCE calltouch_direct_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||
$this->addSql('CREATE SEQUENCE calltouch_map_visit_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||
$this->addSql('CREATE SEQUENCE calltouch_order_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||
$this->addSql('CREATE SEQUENCE calltouch_session_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||
$this->addSql('CREATE SEQUENCE calltouch_webhook_orm_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||
$this->addSql('CREATE TABLE calltouch_session (id INT NOT NULL, calltouch_id INT DEFAULT NULL, session_id BIGINT DEFAULT NULL, keywords TEXT DEFAULT NULL, city VARCHAR(255) DEFAULT NULL, source TEXT DEFAULT NULL, medium TEXT DEFAULT NULL, url TEXT DEFAULT NULL, utm_source TEXT DEFAULT NULL, utm_medium TEXT DEFAULT NULL, utm_term TEXT DEFAULT NULL, utm_content TEXT DEFAULT NULL, utm_campaign TEXT DEFAULT NULL, ya_client_id TEXT DEFAULT NULL, gua_client_id TEXT DEFAULT NULL, call_url TEXT DEFAULT NULL, ct_caller_id VARCHAR(255) DEFAULT NULL, status_details VARCHAR(255) DEFAULT NULL, sip_call_id VARCHAR(255) DEFAULT NULL, call_reference_id VARCHAR(255) DEFAULT NULL, ref TEXT DEFAULT NULL, PRIMARY KEY(id))');
|
||||
$this->addSql('CREATE UNIQUE INDEX uniq_6ce17ff773c45666 ON calltouch_session (calltouch_id)');
|
||||
$this->addSql('CREATE TABLE calltouch (id INT NOT NULL, user_id INT DEFAULT NULL, request_id BIGINT DEFAULT NULL, request_number TEXT DEFAULT NULL, ct_client_id BIGINT DEFAULT NULL, site_id BIGINT NOT NULL, target_request BOOLEAN NOT NULL, status VARCHAR(255) NOT NULL, unique_request BOOLEAN NOT NULL, uniq_target_request BOOLEAN NOT NULL, comments TEXT NOT NULL, date TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, subject VARCHAR(255) DEFAULT NULL, manager VARCHAR(255) DEFAULT NULL, date_str VARCHAR(255) NOT NULL, call_id INT DEFAULT NULL, callphase VARCHAR(255) DEFAULT NULL, call_tags TEXT DEFAULT NULL, duration VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id))');
|
||||
$this->addSql('CREATE INDEX idx_9c123ab5a76ed395 ON calltouch (user_id)');
|
||||
$this->addSql('CREATE TABLE calltouch_order (id INT NOT NULL, calltouch_id INT DEFAULT NULL, order_id BIGINT DEFAULT NULL, call_id BIGINT DEFAULT NULL, status VARCHAR(255) DEFAULT NULL, real_sum VARCHAR(255) DEFAULT NULL, offered VARCHAR(255) DEFAULT NULL, sent DATE DEFAULT NULL, sum DOUBLE PRECISION DEFAULT NULL, is_marked BOOLEAN DEFAULT NULL, comments_count VARCHAR(255) DEFAULT NULL, current_amount DOUBLE PRECISION DEFAULT NULL, order_number VARCHAR(255) DEFAULT NULL, order_sum DOUBLE PRECISION DEFAULT NULL, order_status VARCHAR(255) DEFAULT NULL, order_comments VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id))');
|
||||
$this->addSql('CREATE INDEX idx_d09e836573c45666 ON calltouch_order (calltouch_id)');
|
||||
$this->addSql('CREATE TABLE calltouch_direct (id INT NOT NULL, calltouch_id INT DEFAULT NULL, criteria_id BIGINT DEFAULT NULL, campaign_id BIGINT DEFAULT NULL, ad_group_id BIGINT DEFAULT NULL, ad_id BIGINT DEFAULT NULL, PRIMARY KEY(id))');
|
||||
$this->addSql('CREATE UNIQUE INDEX uniq_e33e2cff73c45666 ON calltouch_direct (calltouch_id)');
|
||||
$this->addSql('CREATE TABLE calltouch_map_visit (id INT NOT NULL, calltouch_id INT DEFAULT NULL, utm_source TEXT DEFAULT NULL, session_date TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, city TEXT DEFAULT NULL, utm_term TEXT DEFAULT NULL, utm_content TEXT DEFAULT NULL, user_agent TEXT DEFAULT NULL, session_id BIGINT DEFAULT NULL, source TEXT DEFAULT NULL, medium TEXT DEFAULT NULL, utm_campaign TEXT DEFAULT NULL, url TEXT DEFAULT NULL, ref TEXT NOT NULL, additional_tags TEXT DEFAULT NULL, utm_medium TEXT DEFAULT NULL, gua_client_id DOUBLE PRECISION DEFAULT NULL, keyword TEXT DEFAULT NULL, session_date_str VARCHAR(255) NOT NULL, PRIMARY KEY(id))');
|
||||
$this->addSql('CREATE INDEX idx_4b22276773c45666 ON calltouch_map_visit (calltouch_id)');
|
||||
$this->addSql('CREATE TABLE calltouch_webhook (orm_id BIGINT NOT NULL, id BIGINT DEFAULT NULL, leadtype VARCHAR(170) DEFAULT NULL, callphase VARCHAR(170) DEFAULT NULL, changed_fields TEXT DEFAULT NULL, request_id BIGINT DEFAULT NULL, request_number VARCHAR(170) DEFAULT NULL, subject TEXT DEFAULT NULL, ct_caller_id BIGINT DEFAULT NULL, sub_pool_name VARCHAR(170) DEFAULT NULL, redirect_number VARCHAR(170) DEFAULT NULL, duration VARCHAR(170) DEFAULT NULL, waiting_time VARCHAR(170) DEFAULT NULL, calltime VARCHAR(170) DEFAULT NULL, "timestamp" VARCHAR(170) DEFAULT NULL, request_date VARCHAR(170) DEFAULT NULL, status VARCHAR(170) DEFAULT NULL, status_details VARCHAR(170) DEFAULT NULL, unique_str VARCHAR(170) DEFAULT NULL, targetcall VARCHAR(170) DEFAULT NULL, uniqtargetcall VARCHAR(170) DEFAULT NULL, callback VARCHAR(170) DEFAULT NULL, uniquerequest VARCHAR(170) DEFAULT NULL, targetrequest VARCHAR(170) DEFAULT NULL, uniqtargetrequest VARCHAR(170) DEFAULT NULL, worktime VARCHAR(170) DEFAULT NULL, pool VARCHAR(170) DEFAULT NULL, rating VARCHAR(170) DEFAULT NULL, comment TEXT DEFAULT NULL, tags_auto_pr VARCHAR(170) DEFAULT NULL, tags_auto_af VARCHAR(170) DEFAULT NULL, tags_auto_gr VARCHAR(170) DEFAULT NULL, tags_auto_ct VARCHAR(170) DEFAULT NULL, tags_auto_pn VARCHAR(170) DEFAULT NULL, tags_manual VARCHAR(170) DEFAULT NULL, tags_api TEXT DEFAULT NULL, tags_request TEXT DEFAULT NULL, attribution VARCHAR(170) DEFAULT NULL, source VARCHAR(170) DEFAULT NULL, medium VARCHAR(170) DEFAULT NULL, utm_source VARCHAR(170) DEFAULT NULL, utm_medium VARCHAR(170) DEFAULT NULL, utm_campaign VARCHAR(170) DEFAULT NULL, utm_content VARCHAR(170) DEFAULT NULL, utm_term VARCHAR(170) DEFAULT NULL, add_url_params TEXT DEFAULT NULL, gcid BIGINT DEFAULT NULL, ya_client_id BIGINT DEFAULT NULL, session_id BIGINT DEFAULT NULL, ct_client_id BIGINT DEFAULT NULL, ct_global_id BIGINT DEFAULT NULL, hostname VARCHAR(170) DEFAULT NULL, url TEXT DEFAULT NULL, attrs TEXT DEFAULT NULL, call_url TEXT DEFAULT NULL, request_url TEXT DEFAULT NULL, callback_request_id BIGINT DEFAULT NULL, callback_final_attempt VARCHAR(170) DEFAULT NULL, ref TEXT DEFAULT NULL, city VARCHAR(170) DEFAULT NULL, browser VARCHAR(170) DEFAULT NULL, os VARCHAR(170) DEFAULT NULL, device VARCHAR(170) DEFAULT NULL, ip VARCHAR(170) DEFAULT NULL, sip_call_id BIGINT DEFAULT NULL, call_reference_number VARCHAR(170) DEFAULT NULL, reclink TEXT DEFAULT NULL, order_id BIGINT DEFAULT NULL, site_id BIGINT DEFAULT NULL, site_name VARCHAR(170) DEFAULT NULL, user_agent TEXT DEFAULT NULL, sending_timestamp VARCHAR(170) DEFAULT NULL, text TEXT DEFAULT NULL, manager VARCHAR(170) DEFAULT NULL, spam VARCHAR(170) DEFAULT NULL, callback_custom_fields VARCHAR(170) DEFAULT NULL, callback_request_facebook_lead_id BIGINT DEFAULT NULL, PRIMARY KEY(orm_id))');
|
||||
$this->addSql('ALTER TABLE calltouch_session ADD CONSTRAINT fk_6ce17ff773c45666 FOREIGN KEY (calltouch_id) REFERENCES calltouch (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||
$this->addSql('ALTER TABLE calltouch ADD CONSTRAINT fk_9c123ab5a76ed395 FOREIGN KEY (user_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||
$this->addSql('ALTER TABLE calltouch_order ADD CONSTRAINT fk_d09e836573c45666 FOREIGN KEY (calltouch_id) REFERENCES calltouch (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||
$this->addSql('ALTER TABLE calltouch_direct ADD CONSTRAINT fk_e33e2cff73c45666 FOREIGN KEY (calltouch_id) REFERENCES calltouch (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||
$this->addSql('ALTER TABLE calltouch_map_visit ADD CONSTRAINT fk_4b22276773c45666 FOREIGN KEY (calltouch_id) REFERENCES calltouch (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20250906131236 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE department ALTER did TYPE BIGINT USING did::bigint');
|
||||
$this->addSql('ALTER TABLE filial ALTER fid TYPE INTEGER USING fid::integer');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE SCHEMA public');
|
||||
$this->addSql('ALTER TABLE department ALTER did TYPE VARCHAR(255)');
|
||||
$this->addSql('ALTER TABLE filial ALTER fid TYPE VARCHAR(255)');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20250907100913 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE review DROP CONSTRAINT fk_794381c67b100c1a');
|
||||
$this->addSql('ALTER TABLE price DROP CONSTRAINT fk_cac822d97b100c1a');
|
||||
$this->addSql('DROP SEQUENCE idoctor_id_seq CASCADE');
|
||||
$this->addSql('DROP SEQUENCE location_id_seq CASCADE');
|
||||
$this->addSql('DROP SEQUENCE specialist_id_seq CASCADE');
|
||||
$this->addSql('ALTER TABLE location DROP CONSTRAINT fk_5e9e89cb299b2577');
|
||||
$this->addSql('ALTER TABLE location DROP CONSTRAINT fk_5e9e89cb7b100c1a');
|
||||
$this->addSql('ALTER TABLE location DROP CONSTRAINT fk_5e9e89cbae80f5df');
|
||||
$this->addSql('DROP TABLE specialist');
|
||||
$this->addSql('DROP TABLE idoctor');
|
||||
$this->addSql('DROP TABLE location');
|
||||
$this->addSql('ALTER TABLE department ALTER did TYPE INT');
|
||||
$this->addSql('DROP INDEX idx_cac822d97b100c1a');
|
||||
$this->addSql('ALTER TABLE price DROP specialist_id');
|
||||
$this->addSql('DROP INDEX idx_794381c67b100c1a');
|
||||
$this->addSql('ALTER TABLE review DROP specialist_id');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE SCHEMA public');
|
||||
$this->addSql('CREATE SEQUENCE idoctor_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||
$this->addSql('CREATE SEQUENCE location_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||
$this->addSql('CREATE SEQUENCE specialist_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||
$this->addSql('CREATE TABLE specialist (id INT NOT NULL, name VARCHAR(255) NOT NULL, nearest_date DATE DEFAULT NULL, kinder INT DEFAULT NULL, speciality VARCHAR(255) DEFAULT NULL, category VARCHAR(255) DEFAULT NULL, expirience VARCHAR(255) DEFAULT NULL, description TEXT DEFAULT NULL, img VARCHAR(255) DEFAULT NULL, infoclinica BOOLEAN NOT NULL, alias VARCHAR(255) NOT NULL, dcode VARCHAR(255) NOT NULL, updated TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, PRIMARY KEY(id))');
|
||||
$this->addSql('CREATE TABLE idoctor (id INT NOT NULL, dcode INT NOT NULL, name VARCHAR(255) NOT NULL, department_id INT NOT NULL, department_name VARCHAR(255) NOT NULL, filial_id INT NOT NULL, filial_name VARCHAR(255) NOT NULL, comment VARCHAR(255) DEFAULT NULL, nearest_date VARCHAR(255) NOT NULL, view_in_web INT NOT NULL, online_mode INT NOT NULL, updated TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, PRIMARY KEY(id))');
|
||||
$this->addSql('CREATE TABLE location (id INT NOT NULL, department_id INT NOT NULL, filial_id INT NOT NULL, specialist_id INT DEFAULT NULL, dcode INT NOT NULL, online_mode BOOLEAN NOT NULL, active BOOLEAN NOT NULL, updated TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, PRIMARY KEY(id))');
|
||||
$this->addSql('CREATE INDEX idx_5e9e89cb299b2577 ON location (filial_id)');
|
||||
$this->addSql('CREATE INDEX idx_5e9e89cb7b100c1a ON location (specialist_id)');
|
||||
$this->addSql('CREATE INDEX idx_5e9e89cbae80f5df ON location (department_id)');
|
||||
$this->addSql('ALTER TABLE location ADD CONSTRAINT fk_5e9e89cb299b2577 FOREIGN KEY (filial_id) REFERENCES filial (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||
$this->addSql('ALTER TABLE location ADD CONSTRAINT fk_5e9e89cb7b100c1a FOREIGN KEY (specialist_id) REFERENCES specialist (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||
$this->addSql('ALTER TABLE location ADD CONSTRAINT fk_5e9e89cbae80f5df FOREIGN KEY (department_id) REFERENCES department (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||
$this->addSql('ALTER TABLE review ADD specialist_id INT DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE review ADD CONSTRAINT fk_794381c67b100c1a FOREIGN KEY (specialist_id) REFERENCES specialist (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||
$this->addSql('CREATE INDEX idx_794381c67b100c1a ON review (specialist_id)');
|
||||
$this->addSql('ALTER TABLE price ADD specialist_id INT DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE price ADD CONSTRAINT fk_cac822d97b100c1a FOREIGN KEY (specialist_id) REFERENCES specialist (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||
$this->addSql('CREATE INDEX idx_cac822d97b100c1a ON price (specialist_id)');
|
||||
$this->addSql('ALTER TABLE department ALTER did TYPE BIGINT');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user