Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- use Phinx\Db\Adapter\MysqlAdapter;
- use Phinx\Migration\AbstractMigration;
- class UserFieldsNullsMigration extends AbstractMigration
- {
- public function up()
- {
- $table = $this->table('ore_nf_users');
- $table->changeColumn('surname', 'string', [
- 'limit' => '64',
- 'default' => null,
- 'null' => true
- ]);
- $table->changeColumn('lastname', 'string', [
- 'limit' => '64',
- 'default' => null,
- 'null' => true
- ]);
- $table->changeColumn('company_post', 'string', [
- 'limit' => '64',
- 'default' => null,
- 'null' => true
- ]);
- $table->changeColumn('city_region', 'string', [
- 'limit' => '64',
- 'default' => null,
- 'null' => true
- ]);
- $table->changeColumn('city', 'string', [
- 'limit' => '64',
- 'default' => null,
- 'null' => true
- ]);
- $table->changeColumn('city_street', 'string', [
- 'limit' => '64',
- 'default' => null,
- 'null' => true
- ]);
- $table->changeColumn('building', 'string', [
- 'limit' => '8',
- 'default' => null,
- 'null' => true
- ]);
- $table->changeColumn('office', 'string', [
- 'limit' => '64',
- 'default' => null,
- 'null' => true
- ]);
- $table->changeColumn('city_district', 'string', [
- 'limit' => '64',
- 'default' => null,
- 'null' => true
- ]);
- $table->changeColumn('post_adress', 'string', [
- 'limit' => '128',
- 'default' => null,
- 'null' => true
- ]);
- $table->changeColumn('ogrn_ogrnip', 'string', [
- 'limit' => '32',
- 'default' => null,
- 'null' => true
- ]);
- $table->changeColumn('skype', 'string', [
- 'limit' => '32',
- 'default' => null,
- 'null' => true
- ]);
- $table->changeColumn('vk_web_site', 'string', [
- 'limit' => '128',
- 'default' => null,
- 'null' => true
- ]);
- $table->changeColumn('odnoklass_site', 'string', [
- 'limit' => '128',
- 'default' => null,
- 'null' => true
- ]);
- $table->changeColumn('facebook_site', 'string', [
- 'limit' => '128',
- 'default' => null,
- 'null' => true
- ]);
- $table->changeColumn('twitter_site', 'string', [
- 'limit' => '128',
- 'default' => null,
- 'null' => true
- ]);
- $table->changeColumn('google_site', 'string', [
- 'limit' => '128',
- 'default' => null,
- 'null' => true
- ]);
- $table->changeColumn('yoytube_site', 'string', [
- 'limit' => '128',
- 'default' => null,
- 'null' => true
- ]);
- $table->changeColumn('instagramm_site', 'string', [
- 'limit' => '128',
- 'default' => null,
- 'null' => true
- ]);
- $table->changeColumn('web_site', 'string', [
- 'limit' => '128',
- 'default' => null,
- 'null' => true
- ]);
- $table->changeColumn('city_phone', 'string', [
- 'limit' => '32',
- 'default' => null,
- 'null' => true
- ]);
- $table->changeColumn('add_phone', 'string', [
- 'limit' => '32',
- 'default' => null,
- 'null' => true
- ]);
- $table->changeColumn('whatsapp_phone', 'string', [
- 'limit' => '32',
- 'default' => null,
- 'null' => true
- ]);
- $table->changeColumn('titlepages_ru', 'text', [
- 'default' => null,
- 'null' => true
- ]);
- $table->changeColumn('titlepages_en', 'text', [
- 'default' => null,
- 'null' => true
- ]);
- $table->changeColumn('titlepages_de', 'text', [
- 'default' => null,
- 'null' => true
- ]);
- $table->changeColumn('titlepages_es', 'text', [
- 'default' => null,
- 'null' => true
- ]);
- $table->changeColumn('titlepages_ar', 'text', [
- 'default' => null,
- 'null' => true
- ]);
- $table->changeColumn('descriptionabout_ru', 'text', [
- 'default' => null,
- 'null' => true,
- 'length' => MysqlAdapter::TEXT_LONG
- ]);
- $table->changeColumn('descriptionabout_en', 'text', [
- 'default' => null,
- 'null' => true,
- 'length' => MysqlAdapter::TEXT_LONG
- ]);
- $table->changeColumn('descriptionabout_de', 'text', [
- 'default' => null,
- 'null' => true,
- 'length' => MysqlAdapter::TEXT_LONG
- ]);
- $table->changeColumn('descriptionabout_es', 'text', [
- 'default' => null,
- 'null' => true,
- 'length' => MysqlAdapter::TEXT_LONG
- ]);
- $table->changeColumn('descriptionabout_ar', 'text', [
- 'default' => null,
- 'null' => true,
- 'length' => MysqlAdapter::TEXT_LONG
- ]);
- $table->save();
- }
- public function down()
- {
- return;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement