Advertisement
Sdelkadrom

Untitled

Jan 27th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.51 KB | None | 0 0
  1. <?php
  2.  
  3. use Phinx\Db\Adapter\MysqlAdapter;
  4. use Phinx\Migration\AbstractMigration;
  5.  
  6. class UserFieldsNullsMigration extends AbstractMigration
  7. {
  8. public function up()
  9. {
  10. $table = $this->table('ore_nf_users');
  11.  
  12. $table->changeColumn('surname', 'string', [
  13. 'limit' => '64',
  14. 'default' => null,
  15. 'null' => true
  16. ]);
  17.  
  18. $table->changeColumn('lastname', 'string', [
  19. 'limit' => '64',
  20. 'default' => null,
  21. 'null' => true
  22. ]);
  23.  
  24. $table->changeColumn('company_post', 'string', [
  25. 'limit' => '64',
  26. 'default' => null,
  27. 'null' => true
  28. ]);
  29.  
  30. $table->changeColumn('city_region', 'string', [
  31. 'limit' => '64',
  32. 'default' => null,
  33. 'null' => true
  34. ]);
  35.  
  36. $table->changeColumn('city', 'string', [
  37. 'limit' => '64',
  38. 'default' => null,
  39. 'null' => true
  40. ]);
  41.  
  42. $table->changeColumn('city_street', 'string', [
  43. 'limit' => '64',
  44. 'default' => null,
  45. 'null' => true
  46. ]);
  47.  
  48. $table->changeColumn('building', 'string', [
  49. 'limit' => '8',
  50. 'default' => null,
  51. 'null' => true
  52. ]);
  53.  
  54. $table->changeColumn('office', 'string', [
  55. 'limit' => '64',
  56. 'default' => null,
  57. 'null' => true
  58. ]);
  59.  
  60. $table->changeColumn('city_district', 'string', [
  61. 'limit' => '64',
  62. 'default' => null,
  63. 'null' => true
  64. ]);
  65.  
  66. $table->changeColumn('post_adress', 'string', [
  67. 'limit' => '128',
  68. 'default' => null,
  69. 'null' => true
  70. ]);
  71.  
  72. $table->changeColumn('ogrn_ogrnip', 'string', [
  73. 'limit' => '32',
  74. 'default' => null,
  75. 'null' => true
  76. ]);
  77.  
  78. $table->changeColumn('skype', 'string', [
  79. 'limit' => '32',
  80. 'default' => null,
  81. 'null' => true
  82. ]);
  83.  
  84. $table->changeColumn('vk_web_site', 'string', [
  85. 'limit' => '128',
  86. 'default' => null,
  87. 'null' => true
  88. ]);
  89.  
  90. $table->changeColumn('odnoklass_site', 'string', [
  91. 'limit' => '128',
  92. 'default' => null,
  93. 'null' => true
  94. ]);
  95.  
  96. $table->changeColumn('facebook_site', 'string', [
  97. 'limit' => '128',
  98. 'default' => null,
  99. 'null' => true
  100. ]);
  101.  
  102. $table->changeColumn('twitter_site', 'string', [
  103. 'limit' => '128',
  104. 'default' => null,
  105. 'null' => true
  106. ]);
  107.  
  108. $table->changeColumn('google_site', 'string', [
  109. 'limit' => '128',
  110. 'default' => null,
  111. 'null' => true
  112. ]);
  113.  
  114. $table->changeColumn('yoytube_site', 'string', [
  115. 'limit' => '128',
  116. 'default' => null,
  117. 'null' => true
  118. ]);
  119.  
  120. $table->changeColumn('instagramm_site', 'string', [
  121. 'limit' => '128',
  122. 'default' => null,
  123. 'null' => true
  124. ]);
  125.  
  126. $table->changeColumn('web_site', 'string', [
  127. 'limit' => '128',
  128. 'default' => null,
  129. 'null' => true
  130. ]);
  131.  
  132. $table->changeColumn('city_phone', 'string', [
  133. 'limit' => '32',
  134. 'default' => null,
  135. 'null' => true
  136. ]);
  137.  
  138. $table->changeColumn('add_phone', 'string', [
  139. 'limit' => '32',
  140. 'default' => null,
  141. 'null' => true
  142. ]);
  143.  
  144. $table->changeColumn('whatsapp_phone', 'string', [
  145. 'limit' => '32',
  146. 'default' => null,
  147. 'null' => true
  148. ]);
  149.  
  150. $table->changeColumn('titlepages_ru', 'text', [
  151. 'default' => null,
  152. 'null' => true
  153. ]);
  154.  
  155. $table->changeColumn('titlepages_en', 'text', [
  156. 'default' => null,
  157. 'null' => true
  158. ]);
  159.  
  160. $table->changeColumn('titlepages_de', 'text', [
  161. 'default' => null,
  162. 'null' => true
  163. ]);
  164.  
  165. $table->changeColumn('titlepages_es', 'text', [
  166. 'default' => null,
  167. 'null' => true
  168. ]);
  169.  
  170. $table->changeColumn('titlepages_ar', 'text', [
  171. 'default' => null,
  172. 'null' => true
  173. ]);
  174.  
  175. $table->changeColumn('descriptionabout_ru', 'text', [
  176. 'default' => null,
  177. 'null' => true,
  178. 'length' => MysqlAdapter::TEXT_LONG
  179. ]);
  180.  
  181. $table->changeColumn('descriptionabout_en', 'text', [
  182. 'default' => null,
  183. 'null' => true,
  184. 'length' => MysqlAdapter::TEXT_LONG
  185. ]);
  186.  
  187. $table->changeColumn('descriptionabout_de', 'text', [
  188. 'default' => null,
  189. 'null' => true,
  190. 'length' => MysqlAdapter::TEXT_LONG
  191. ]);
  192.  
  193. $table->changeColumn('descriptionabout_es', 'text', [
  194. 'default' => null,
  195. 'null' => true,
  196. 'length' => MysqlAdapter::TEXT_LONG
  197. ]);
  198.  
  199. $table->changeColumn('descriptionabout_ar', 'text', [
  200. 'default' => null,
  201. 'null' => true,
  202. 'length' => MysqlAdapter::TEXT_LONG
  203. ]);
  204.  
  205. $table->save();
  206. }
  207.  
  208. public function down()
  209. {
  210. return;
  211. }
  212. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement