feat(data-import): Add data import script for provinces, cities, specialties, and doctor services
- Implemented a PHP script to import data from JSON files into the database. - Added functionality to truncate and clear existing data in relevant tables. - Inserted provinces, cities, specialties (including parent-child relationships), and doctor services from JSON files. - Updated foreign key checks and reset AUTO_INCREMENT values for relevant tables. - Added JSON files for provinces, cities, and specialties. chore(migrations): Update cities table to allow longtext for keywords - Modified the `keywords` column in the `cities` table to change its type from VARCHAR(255) to LONGTEXT.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<?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 Version20260610110039 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 cities CHANGE keywords keywords LONGTEXT DEFAULT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE cities CHANGE keywords keywords VARCHAR(255) DEFAULT NULL');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user