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

[NFR] Support migration generation with timestamp based versions #144

Open
dekiftw opened this issue Dec 6, 2023 · 1 comment
Open

[NFR] Support migration generation with timestamp based versions #144

dekiftw opened this issue Dec 6, 2023 · 1 comment

Comments

@dekiftw
Copy link

dekiftw commented Dec 6, 2023

The NFR format link isn't working so I'm going with the 'new issue' template. Regardless, this is a NFR to support migration generation with timestamp based versions.

Expected and Actual Behavior

Consider the following config file /app/config/migrations.php, with the following content:

<?php

declare(strict_types=1);

return [
    'application' => [
        'migrationsDir' => __DIR__ . '/database/migrations',
        'migrationsTsBased' => true,
    ],
    'database' => [
       // REDACTED
    ],
];

Expected

I expect that, when running:

vendor/bin/phalcon-migrations generate --config=/app/config/migrations.php

I would get (something like) the following output:

Phalcon Migrations

                                                                
  Success: Version 1701806603960851 was successfully generated

Saying that a migration with a timestamp based version of 1701806603960851 was generated.

This behavior is the same even when the config file doesn't contain the migrationsTsBased setting but a command line argument is provided, like so:

vendor/bin/phalcon-migrations generate --config=/app/config/migrations.php --ts-based

Actual

For the same config file, running:

vendor/bin/phalcon-migrations generate --config=/app/config/migrations.php

gives the following output:

Phalcon Migrations

                                                     
  Success: Version 1.0.0 was successfully generated

Saying that a migration with an incremental version of 1.0.0 was generated.

@dekiftw
Copy link
Author

dekiftw commented Dec 6, 2023

#145

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

No branches or pull requests

1 participant