ZF-11767: zf create db-table.from-database disallow to use force-overwrite without module name

Issue Type: Docs: Improvement Created: 2011-09-25T14:33:54.000+0000 Last Updated: 2011-10-02T23:16:16.000+0000 Status: Closed Fix version(s): - 1.11.12 (22/Jun/12)

Reporter: Sergey Boroday (simpliest) Assignee: Raphael de Almeida (jaguarnet7) Tags: - Zend_Tool

Related issues: Attachments: - ZF-11767.diff


We can't use force-overwrite option if project's db-table models was created by default (without module name definition) But we can to create models without module name at first time.

Steps to reproduce:

<pre class="highlight">
zf create project demo
cd demo
zf configure db-adapter "adapter=Mysqli&dbname=mysql&host=localhost&username=user&password=user_pass"
zf create db-table.from-database

all created - ok.

Then try to recreate

<pre class="highlight">
zf create db-table.from-database // Error as expected
zf create db-table.from-database force-overwrite // Error - we should define module name (but we doesn't have it) 
zf create db-table.from-database default force-overwrite // Error - yep, we doesn't created default module, then error expected
zf create db-table.from-database application force-overwrite //Error - same

So, there no way to recreate....

Workaround Remove manually all files from application/models/DbTables And remove appropriate sections for tables in in .zfproject.xml


Posted by Raphael de Almeida (jaguarnet7) on 2011-09-27T00:30:26.000+0000


<pre class="highlight">
zf create db-table.from-database --force-overwrite=true

Its ran for me.

Posted by Sergey Boroday (simpliest) on 2011-09-27T09:15:13.000+0000

Thanks, it works... But could you give one more advice? Where can i find this in documentation? Because tool's commandline help does not describe such syntax for keys

Posted by Raphael de Almeida (jaguarnet7) on 2011-09-28T03:17:38.000+0000

Suggest for improvement documentation

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.