addSql('ALTER TABLE country ALTER name TYPE JSON'); $this->addSql('ALTER TABLE country ALTER name SET DEFAULT \'[]\'::json'); $this->addSql('ALTER TABLE country ALTER name DROP NOT NULL'); $this->addSql('COMMENT ON COLUMN country.name IS \'(DC2Type:simple_array)\''); $this->addSql('ALTER TABLE chill_person_household_composition_type ALTER label TYPE JSON'); $this->addSql('ALTER TABLE chill_person_household_composition_type ALTER label SET DEFAULT \'[]\'::json'); $this->addSql('ALTER TABLE chill_person_household_composition_type ALTER label DROP NOT NULL'); $this->addSql('COMMENT ON COLUMN chill_person_household_composition_type.label IS \'(DC2Type:simple_array)\''); } public function getDescription(): string { return 'convert json fields to jsonb'; } public function up(Schema $schema): void { $this->addSql('ALTER TABLE chill_person_household_composition_type ALTER label TYPE JSONB'); $this->addSql('ALTER TABLE chill_person_household_composition_type ALTER label SET DEFAULT \'[]\'::jsonb'); $this->addSql('ALTER TABLE chill_person_household_composition_type ALTER label DROP NOT NULL'); $this->addSql('COMMENT ON COLUMN chill_person_household_composition_type.label IS \'(DC2Type:json)\''); $this->addSql('ALTER TABLE country ALTER name TYPE JSONB'); $this->addSql('ALTER TABLE country ALTER name SET DEFAULT \'[]\'::jsonb'); $this->addSql('ALTER TABLE country ALTER name DROP NOT NULL'); $this->addSql('COMMENT ON COLUMN country.name IS \'(DC2Type:json)\''); } }