Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Override ignore_tables_out#28

Answeredbykszymukowicz
einNicklas asked this question inQ&A
Discussion options

Hey!

I tried to override the tables which are excluded by the export this way:
https://github.com/sourcebroker/deployer-extended-database?tab=readme-ov-file#config-of-truncate_tables-ignore_tables_out-post_sql_in_markers

config.php:

set('db_default',array_merge(get('db_default'), ['ignore_tables_out' => ['cf_.*','cache_.*','be_sessions','fe_sessions','fe_session_data','tx_devlog','tx_extensionmanager_domain_model_extension','tx_solr_.*','tx_crawler_queue','tx_crawler_process',    ],]));

Unfortunately, it doesn't work. I looked into the code and founddb_databases_merged, which is used by the db:export task, so I debugged it locally with:

task('debug:config',function () {$dbConfig =get('db_databases_merged');writeln(print_r($dbConfig,true));});

The output includes the default tables including sys_history, what I am trying to change.

task debug:config[local] /usr/bin/php8.2 /var/www/html/vendor/deployer/deployer/dep worker --port 43985 --task debug:config --hostlocal --decorated -vvv[local] Array(    [database_default] => Array        (            [truncate_tables] => Array                (                    [0] => (?!cache_imagesizes)cache_.*                )            [ignore_tables_out] => Array                (                    [0] => cf_.*                    [1] => cache_.*                    [2] => be_sessions                    [3] => fe_sessions                    [4] => fe_session_data                    [5] => sys_file_processedfile                    [6] => sys_history                    [7] => sys_log                    [8] => sys_refindex                    [9] => tx_devlog                    [10] => tx_extensionmanager_domain_model_extension                    [11] => tx_powermail_domain_model_mail                    [12] => tx_powermail_domain_model_answer                    [13] => tx_solr_.*                    [14] => tx_crawler_queue                    [15] => tx_crawler_process                )            [post_sql_in] =>            [post_sql_in_markers] =>            [host] => db            [port] =>            [dbname] => db            [user] => db            [password] => db        ))done onlocaldone debug:config 100ms

I also attempted to usedb_databases_overwrite_global anddb_databases_overwrite (https://github.com/sourcebroker/deployer-extended-typo3/blob/master/UPGRADE.rst). Didn't work either.

Is it a bug, or am I doing it the wrong way?

You must be logged in to vote

You wanted to unset. I did not read carefully. Sry.
Looks like the only way now is:

$tmp = get('db_databases');unset($tmp['database_default'][0]['ignore_tables_out'][4]);set('db_databases', $tmp);

We have it done better way inhttps://github.com/sourcebroker/deployer-extended-media
but fordeployer-extended-database there is no yet such possiblities:

set('media_custom', [    'exclude-case-insensitive' => [        '__UNSET' => get('media_default')['exclude-case-insensitive'],        '*.mp4'    ],]);

Replies: 4 comments

Comment options

hi,

can you try?

set('db_databases_overwrite_global', [    'database_default' =>        [            '0' =>                [                    'ignore_tables_out' =>                        [                            0 => 'my_table1',                            1 => 'my_table2',                        ],                ],        ],]);
You must be logged in to vote
0 replies
Comment options

Thanks for the prompt reply! :)

Now, the two tables are appended to the end:

task debug:config[local] /usr/bin/php8.2 /var/www/html/vendor/deployer/deployer/dep worker --port 44685 --task debug:config --hostlocal --decorated -vvv[local] Array(    [database_default] => Array        (            [truncate_tables] => Array                (                    [0] => (?!cache_imagesizes)cache_.*                )            [ignore_tables_out] => Array                (                    [0] => cf_.*                    [1] => cache_.*                    [2] => be_sessions                    [3] => fe_sessions                    [4] => fe_session_data                    [5] => sys_file_processedfile                    [6] => sys_history                    [7] => sys_log                    [8] => sys_refindex                    [9] => tx_devlog                    [10] => tx_extensionmanager_domain_model_extension                    [11] => tx_powermail_domain_model_mail                    [12] => tx_powermail_domain_model_answer                    [13] => tx_solr_.*                    [14] => tx_crawler_queue                    [15] => tx_crawler_process                    [16] => my_table1                    [17] => my_table2                )            [post_sql_in] =>            [post_sql_in_markers] =>            [host] => db            [port] =>            [dbname] => db            [user] => db            [password] => db        ))done onlocaldone debug:config 102ms
You must be logged in to vote
0 replies
Comment options

You wanted to unset. I did not read carefully. Sry.
Looks like the only way now is:

$tmp = get('db_databases');unset($tmp['database_default'][0]['ignore_tables_out'][4]);set('db_databases', $tmp);

We have it done better way inhttps://github.com/sourcebroker/deployer-extended-media
but fordeployer-extended-database there is no yet such possiblities:

set('media_custom', [    'exclude-case-insensitive' => [        '__UNSET' => get('media_default')['exclude-case-insensitive'],        '*.mp4'    ],]);
You must be logged in to vote
0 replies
Answer selected bykszymukowicz
Comment options

All right, that works – thank you!

Yes, I was already looking for that because I also usemedia_custom with__UNSET.
Maybe for the future. :)

You must be logged in to vote
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
2 participants
@einNicklas@kszymukowicz
Converted from issue

This discussion was converted from issue #27 on September 20, 2024 11:53.


[8]ページ先頭

©2009-2025 Movatter.jp