phalcon / phalcon/migrations

[NFR] Support migration generation with timestamp based versions

Open
#144 1 comment 0 reactions 1 assignee View on GitHub

@niden is already working on this.

Since Jul 4, 2026.

Dominant language
PHP
Stars
28
Forks
25
Avg merge
9h 39m
Merged PRs (30d)
2

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.