database-command icon indicating copy to clipboard operation
database-command copied to clipboard

wildcard for db dump

Open tschlich opened this issue 11 years ago • 5 comments

dumping with --prefix=news also dumps "newsCategory" or "newsSomething"

would be great to get those other tables dumped only when using a wildcard --prefix=news >>> dumps "news" --prefix=news* >>> dumps "news", "newsCategory", "newsSomething"

tschlich avatar Jun 14 '13 08:06 tschlich

I think we should implement this with multiple --include and --exclude options. Maybe --includeTables and --excludeTables.

schmunk42 avatar Jun 14 '13 10:06 schmunk42

what would that mean for usage?

--prefix=news 
--exclude=newsCategories,newsSomething

or

--include=news 
--exclude=newsCategories,newsSomething

or

--include=news 
--exclude=newsCategories,newsSomething

or to get all dumped

--include=news,newsCategories,newsSomething

tschlich avatar Jun 14 '13 11:06 tschlich

Was merely about wildcards/regex, maybe we shouldn't allow mixing --prefix with --include/exclude...

Dump all news Tables except for newsCategories and newsSomething

--include=news*
--exclude=newsCategories
--exclude=newsSomething

Just dump news Table

--include=news

schmunk42 avatar Jun 14 '13 12:06 schmunk42

so

--include=news*
--exclude=newsCategories

would dump "news" and "newsSomething" or only "newsSomething" because the wildcard means there has to be more...?

tschlich avatar Jun 14 '13 12:06 tschlich

awaiting PR :)

schmunk42 avatar Jul 22 '13 21:07 schmunk42