Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue #12 - filename strategy #81

Merged
merged 1 commit into from
Feb 13, 2024
Merged

issue #12 - filename strategy #81

merged 1 commit into from
Feb 13, 2024

Conversation

pounard
Copy link
Member

@pounard pounard commented Feb 12, 2024

Adds an interface:

interface FilenameStrategyInterface
{
    /**
     * Generate dump file name.
     */
    public function generateFilename(
        string $storageRootDir,
        string $connectionName = 'default',
        string $extension = 'sql',
        bool $anonymized = false
    ): string;
}

Configuration goes like this:

db_tools:
    # ...

    connections:
        default:
            filename_strategy: MakinaCorpus\DbToolsBundle\Filename\StupideTestingFilenameStrategy
        foo_connection:
            filename_strategy: "default" # can be "datetime"
        mysql:
            filename_strategy: ~

And documentation is missing, do not merge yet !

@SimonMellerin any opinions ?

@pounard pounard force-pushed the issue-12-filename-strategy branch from f6bdc98 to 1ad8c8d Compare February 13, 2024 08:39
Copy link
Member

@SimonMellerin SimonMellerin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you can add some unit tests :)

@pounard pounard force-pushed the issue-12-filename-strategy branch 3 times, most recently from b9a5d94 to 36c90f9 Compare February 13, 2024 13:01
@pounard pounard force-pushed the issue-12-filename-strategy branch from 36c90f9 to de76457 Compare February 13, 2024 15:27
@pounard pounard force-pushed the issue-12-filename-strategy branch from de76457 to 44b7671 Compare February 13, 2024 16:22
@pounard pounard merged commit 8842a75 into main Feb 13, 2024
26 checks passed
@pounard pounard deleted the issue-12-filename-strategy branch February 13, 2024 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants