承接 websupply/doctrine-wipe 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

websupply/doctrine-wipe

最新稳定版本:0.0.1

Composer 安装命令:

composer require websupply/doctrine-wipe

包简介

README 文档

README

Delete all data and tables available from the Doctrine connection. Using the configured platforms DROP and TRUNCATE query statements.

A quick help, if you need to re-apply all migrations or re-import a dataset to certain tables

These commands are DESTRUCTIVE.

Installation

composer require websupply/doctrine-wipe --dev

All commands supports --dry-run

All commands supports a --dry-run command, that will output the statements, but not execute them.

Output would look like this

> ./flow doctrine:drop --table products --dry-run
--------------------------------------
 Dry run - no statements are executed
--------------------------------------

[QUERY]: "SET foreign_key_checks = 0"
[QUERY]: "DROP TABLE products"
[QUERY]: "SET foreign_key_checks = 1"

The drop command

You can drop one or all tables with the command

./flow doctrine:drop

One of the following arguments are required

--all will drop all tables present in the database (no looking up ORM stuff - this is direct database)

--table <table> will drop only the given table

Example:

> ./flow doctrine:drop --all

[QUERY]: "SET foreign_key_checks = 0"
[QUERY]: "DROP TABLE `companies`"
[QUERY]: "DROP TABLE `contacts`"
[QUERY]: "DROP TABLE `employees`"
[QUERY]: "DROP TABLE `flow_doctrine_migrationstatus`"
[QUERY]: "DROP TABLE `neos_flow_mvc_routing_objectpathmapping`"
[QUERY]: "DROP TABLE `neos_flow_resourcemanagement_persistentresource`"
[QUERY]: "DROP TABLE `neos_flow_security_account`"
[QUERY]: "DROP TABLE `products`"
[QUERY]: "DROP TABLE `scopes`"
[QUERY]: "DROP TABLE `tasks`"
[QUERY]: "DROP TABLE `users`"
[QUERY]: "SET foreign_key_checks = 1"

The truncate command

The drop command

You can empty/truncate the rows from one or all tables with the command

./flow doctrine:truncate

One of the following arguments are required

--all truncate all tables present in the database (no looking up ORM stuff - this is direct database)

--table <table> will truncate only the given table

Example:

> ./flow doctrine:truncate --all
[QUERY]: "SET foreign_key_checks = 0"
[QUERY]: "TRUNCATE companies"
[QUERY]: "TRUNCATE contacts"
[QUERY]: "TRUNCATE employees"
[QUERY]: "TRUNCATE neos_flow_mvc_routing_objectpathmapping"
[QUERY]: "TRUNCATE neos_flow_resourcemanagement_persistentresource"
[QUERY]: "TRUNCATE neos_flow_security_account"
[QUERY]: "TRUNCATE products"
[QUERY]: "TRUNCATE scopes"
[QUERY]: "TRUNCATE tasks"
[QUERY]: "TRUNCATE users"
[QUERY]: "SET foreign_key_checks = 1"

The Doctrine migration table

The flow_doctrine_migrationstatus table is not truncated, even when passing the --all argument.

If you need to truncate this, our guess is, you looking at dropping the whole table and reapply migration.

Support and sponsoring

Work on this package is supported by the Danish web company WebSupply ApS

统计信息

  • 总下载量: 46
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2023-02-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固