当前位置: 首页>>代码示例>>PHP>>正文


PHP Schema::dropTable方法代码示例

本文整理汇总了PHP中Doctrine\DBAL\Schema\Schema::dropTable方法的典型用法代码示例。如果您正苦于以下问题:PHP Schema::dropTable方法的具体用法?PHP Schema::dropTable怎么用?PHP Schema::dropTable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Doctrine\DBAL\Schema\Schema的用法示例。


在下文中一共展示了Schema::dropTable方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: down

 /**
  * @param Schema $schema
  */
 public function down(Schema $schema)
 {
     // Drop beer table
     $schema->dropTable('beers');
     // Drop messages table
     $schema->dropTable('messages');
 }
开发者ID:NeoBlack,项目名称:T3Bot,代码行数:10,代码来源:Version20160214204059.php

示例2: down

 /**
  * Down method
  *
  * @param Schema $schema
  */
 public function down(Schema $schema)
 {
     if (Version::isSupportGetInstanceFunction()) {
         $app = Application::getInstance();
         $meta = $this->getMetadata($app['orm.em']);
         $tool = new SchemaTool($app['orm.em']);
         $schemaFromMetadata = $tool->getSchemaFromMetadata($meta);
         // テーブル削除
         foreach ($schemaFromMetadata->getTables() as $table) {
             if ($schema->hasTable($table->getName())) {
                 $schema->dropTable($table->getName());
             }
         }
         // シーケンス削除
         foreach ($schemaFromMetadata->getSequences() as $sequence) {
             if ($schema->hasSequence($sequence->getName())) {
                 $schema->dropSequence($sequence->getName());
             }
         }
     } else {
         if ($schema->hasTable(self::MAKER)) {
             $schema->dropTable(self::MAKER);
         }
         if ($schema->hasTable(self::PRODUCTMAKER)) {
             $schema->dropTable(self::PRODUCTMAKER);
         }
     }
     if ($this->connection->getDatabasePlatform()->getName() == 'postgresql') {
         foreach ($this->sequence as $sequence) {
             if ($schema->hasSequence($sequence)) {
                 $schema->dropSequence($sequence);
             }
         }
     }
 }
开发者ID:EC-CUBE,项目名称:maker-plugin,代码行数:40,代码来源:Version201507231300.php

示例3: down

 /**
  * @param Schema $schema
  */
 public function down(Schema $schema)
 {
     // this down() migration is auto-generated, please modify it to your needs
     $schema->dropTable('plg_maker_plugin');
     $schema->dropTable('plg_maker');
     $schema->dropTable('plg_product_maker');
 }
开发者ID:shinichi-takahashi,项目名称:maker-plugin,代码行数:10,代码来源:Version201507231300.php

示例4: down

 /**
  * Remove data.
  *
  * @param Schema $schema
  */
 public function down(Schema $schema)
 {
     if (Version::isSupportGetInstanceFunction()) {
         $app = Application::getInstance();
         $meta = $this->getMetadata($app['orm.em']);
         $tool = new SchemaTool($app['orm.em']);
         $schemaFromMetadata = $tool->getSchemaFromMetadata($meta);
         // テーブル削除
         foreach ($schemaFromMetadata->getTables() as $table) {
             if ($schema->hasTable($table->getName())) {
                 $schema->dropTable($table->getName());
             }
         }
         // シーケンス削除
         foreach ($schemaFromMetadata->getSequences() as $sequence) {
             if ($schema->hasSequence($sequence->getName())) {
                 $schema->dropSequence($sequence->getName());
             }
         }
     } else {
         // this down() migration is auto-generated, please modify it to your needs
         $schema->dropTable(self::NAME);
         $schema->dropSequence('plg_recommend_product_recommend_product_id_seq');
     }
 }
开发者ID:EC-CUBE,项目名称:Recommend-plugin,代码行数:30,代码来源:Version201510211300.php

示例5: down

 /**
  * remove table.
  *
  * @param Schema $schema
  */
 public function down(Schema $schema)
 {
     //current version >= 3.0.9
     if (Version::isSupportGetInstanceFunction()) {
         $app = Application::getInstance();
         $meta = $this->getMetadata($app['orm.em']);
         $tool = new SchemaTool($app['orm.em']);
         $schemaFromMetadata = $tool->getSchemaFromMetadata($meta);
         // テーブル削除
         foreach ($schemaFromMetadata->getTables() as $table) {
             if ($schema->hasTable($table->getName())) {
                 $schema->dropTable($table->getName());
             }
         }
         // シーケンス削除
         foreach ($schemaFromMetadata->getSequences() as $sequence) {
             if ($schema->hasSequence($sequence->getName())) {
                 $schema->dropSequence($sequence->getName());
             }
         }
         //for delete sequence in postgresql
         if ($this->connection->getDatabasePlatform()->getName() == 'postgresql') {
             $schema->dropSequence('plg_related_product_id_seq');
         }
     } else {
         // this down() migration is auto-generated, please modify it to your needs
         $schema->dropTable(self::NAME);
         $schema->dropSequence('plg_related_product_id_seq');
     }
 }
开发者ID:EC-CUBE,项目名称:related-product-plugin,代码行数:35,代码来源:Version20150808173000.php

示例6: up

 /**
  * {@inheritdoc}
  */
 public function up(Schema $schema, QueryBag $queries)
 {
     $this->fillActivityTables($queries);
     $this->fillActivityListTables($queries);
     // Remove orocrm_magento_cart_emails
     $table = $schema->getTable('orocrm_magento_cart_emails');
     $table->removeForeignKey('FK_11B0F84B1AD5CDBF');
     $table->removeForeignKey('FK_11B0F84BA832C1C9');
     $schema->dropTable('orocrm_magento_cart_emails');
     // Remove orocrm_magento_cart_calls
     $table = $schema->getTable('orocrm_magento_cart_calls');
     $table->removeForeignKey('FK_83A847751AD5CDBF');
     $table->removeForeignKey('FK_83A8477550A89B2C');
     $schema->dropTable('orocrm_magento_cart_calls');
     // Remove orocrm_magento_order_emails
     $table = $schema->getTable('orocrm_magento_order_emails');
     $table->removeForeignKey('FK_10E2A9508D9F6D38');
     $table->removeForeignKey('FK_10E2A950A832C1C9');
     $schema->dropTable('orocrm_magento_order_emails');
     // Remove orocrm_magento_order_calls
     $table = $schema->getTable('orocrm_magento_order_calls');
     $table->removeForeignKey('FK_A885A3450A89B2C');
     $table->removeForeignKey('FK_A885A348D9F6D38');
     $schema->dropTable('orocrm_magento_order_calls');
 }
开发者ID:antrampa,项目名称:crm,代码行数:28,代码来源:FillActivityAssociationTables.php

示例7: down

 public function down(Schema $schema)
 {
     $schema->dropTable('OAuthAuthCode');
     $schema->dropTable('OAuthAccessToken');
     $schema->dropTable('OAuthRefreshToken');
     $schema->dropTable('OAuthClient');
 }
开发者ID:fruux,项目名称:Baikal2,代码行数:7,代码来源:Version20141129182419.php

示例8: down

 /**
  * @param Schema $schema
  */
 public function down(Schema $schema)
 {
     $schema->dropTable('dict_topic');
     $schema->dropTable('dict_source');
     $schema->dropTable('dict_web');
     $schema->dropTable('dict_ro');
     $schema->dropTable('dict_queue');
 }
开发者ID:v3kwip,项目名称:tudien,代码行数:11,代码来源:Version20160402165839.php

示例9: down

 /**
  * @param Schema $schema
  */
 public function down(Schema $schema)
 {
     // this down() migration is auto-generated, please modify it to your needs
     $schema->dropTable('plg_coupon');
     $schema->dropSequence('plg_coupon_coupon_id_seq');
     $schema->dropTable('plg_coupon_detail');
     $schema->dropSequence('plg_coupon_detail_coupon_detail_id_seq');
     $schema->dropTable('plg_coupon_order');
     $schema->dropSequence('plg_coupon_order_id_seq');
 }
开发者ID:EC-CUBE,项目名称:coupon-plugin,代码行数:13,代码来源:Version201507231300.php

示例10: down

 /**
  * @param Schema $schema
  */
 public function down(Schema $schema)
 {
     // this down() migration is auto-generated, please modify it to your needs
     $schema->dropTable('plg_mailmaga_plugin');
     // drop Sequence MailMagazine Plug-in
     $schema->dropTable('plg_mailmaga_template');
     $schema->dropTable('plg_send_history');
     $schema->dropTable('plg_send_customer');
     // drop sequence.
     $schema->dropSequence('plg_mailmaga_template_template_id_seq');
     $schema->dropSequence('plg_send_history_send_id_seq');
 }
开发者ID:shinichi-takahashi,项目名称:mail-magazine-plugin,代码行数:15,代码来源:Version201508072300.php

示例11: up

 /**
  * {@inheritdoc}
  */
 public function up(Schema $schema, QueryBag $queries)
 {
     $this->fillActivityTables($queries);
     $this->fillActivityListTables($queries);
     // Remove orocrm_contactus_req_emails
     $table = $schema->getTable('orocrm_contactus_req_emails');
     $table->removeForeignKey('FK_E494F7AE427EB8A5');
     $table->removeForeignKey('FK_E494F7AEA832C1C9');
     $schema->dropTable('orocrm_contactus_req_emails');
     // Remove orocrm_contactus_request_calls
     $table = $schema->getTable('orocrm_contactus_request_calls');
     $table->removeForeignKey('FK_6F7A50CE427EB8A5');
     $table->removeForeignKey('FK_6F7A50CE50A89B2C');
     $schema->dropTable('orocrm_contactus_request_calls');
 }
开发者ID:abipit,项目名称:crm,代码行数:18,代码来源:FillActivityAssociationTables.php

示例12: oroCrmCreateTaskTable

 /**
  * @param Schema $schema
  */
 protected function oroCrmCreateTaskTable(Schema $schema)
 {
     if ($schema->hasTable($this->taskTableName)) {
         $schema->dropTable($this->taskTableName);
     }
     $table = $schema->createTable($this->taskTableName);
     $table->addColumn('id', 'integer', ['autoincrement' => true]);
     $table->addColumn('subject', 'string', ['notnull' => false, 'length' => 255]);
     $table->addColumn('description', 'string', ['notnull' => false, 'length' => 255]);
     $table->addColumn('due_date', 'datetime');
     $table->addColumn('task_priority_name', 'string', ['notnull' => false, 'length' => 32]);
     $table->addColumn('owner_id', 'integer', ['notnull' => false]);
     $table->addColumn('related_account_id', 'integer', ['notnull' => false]);
     $table->addColumn('related_contact_id', 'integer', ['notnull' => false]);
     $table->addColumn('reporter_id', 'integer', ['notnull' => false]);
     $table->addColumn('workflow_item_id', 'integer', ['notnull' => false]);
     $table->addColumn('workflow_step_id', 'integer', ['notnull' => false]);
     $table->addColumn('createdAt', 'datetime');
     $table->addColumn('updatedAt', 'datetime', ['notnull' => false]);
     $table->setPrimaryKey(['id']);
     $table->addIndex(['task_priority_name'], 'IDX_814DEE3FD34C1E8E', []);
     $table->addIndex(['owner_id'], 'IDX_814DEE3F7E3C61F9', []);
     $table->addIndex(['related_account_id'], 'IDX_814DEE3FE774F01D', []);
     $table->addIndex(['related_contact_id'], 'IDX_814DEE3FD6204081', []);
     $table->addIndex(['reporter_id'], 'IDX_814DEE3FE1CFE6F5', []);
     $table->addIndex(['due_date'], 'task_due_date_idx');
     $table->addUniqueIndex(['workflow_item_id'], 'UNIQ_814DEE3F1023C4EE');
     $table->addIndex(['workflow_step_id'], 'IDX_814DEE3F71FE882C', []);
     $this->oroCrmCreateTaskTableForeignKeys($schema);
 }
开发者ID:antrampa,项目名称:crm,代码行数:33,代码来源:OroCRMTaskBundle.php

示例13: down

 public function down(Schema $schema)
 {
     //start cc_show_instances modifications
     $show_instances_table = $schema->getTable('cc_show_instances');
     $show_instances_table->dropColumn('record');
     $show_instances_table->dropColumn('rebroadcast');
     $show_instances_table->dropColumn('instance_id');
     $show_instances_table->dropColumn('file_id');
     $show_instances_table->dropColumn('soundcloud_id');
     //end cc_show_instances modifications
     //start cc_show_days modifications
     $show_days_table = $schema->getTable('cc_show_days');
     $show_days_table->dropColumn('record');
     //end cc_show_days modifications
     //start cc_show modifications
     $show_table = $schema->getTable('cc_show');
     $show_table->dropColumn('url');
     //end cc_show modifications
     //start cc_schedule modifications
     $schedule_table = $schema->getTable('cc_schedule');
     $playlist_id_col = $schedule_table->getColumn('playlist_id');
     $playlist_id_col->setNotnull(true);
     //end cc_schedule modifications
     //drop cc_show_rebroadcast table
     $schema->dropTable('cc_show_rebroadcast');
     //end drop cc_show_rebroadcast table
 }
开发者ID:RadioCampusFrance,项目名称:airtime,代码行数:27,代码来源:Version20110331111708.php

示例14: up

 /**
  * Attributes table was not used in the code anymore so can be removed
  *
  * @param Schema $schema
  */
 public function up(Schema $schema)
 {
     $prefixedTableName = $this->getTablePrefix() . 'attribute';
     if ($schema->hasTable($prefixedTableName)) {
         $schema->dropTable($prefixedTableName);
     }
 }
开发者ID:baszoetekouw,项目名称:janus,代码行数:12,代码来源:Version20130715003619RemovedUnusedAttributesTable.php

示例15: down

 public function down(Schema $schema)
 {
     $tables = ['module', 'module_admin', 'user', 'user_provider'];
     foreach ($tables as $table) {
         $schema->dropTable($table);
     }
 }
开发者ID:Tigerlee1987,项目名称:modules.zendframework.com,代码行数:7,代码来源:Version20150926125836.php


注:本文中的Doctrine\DBAL\Schema\Schema::dropTable方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。