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

Add all supported types as shortcuts into the Migration Builder #227

Open
viktorprogger opened this issue Nov 1, 2023 · 1 comment
Open
Labels
good first issue Simple enough issue to start with. type:enhancement Enhancement

Comments

@viktorprogger
Copy link
Contributor

viktorprogger commented Nov 1, 2023

Add shortcuts for all SchemaInterface::TYPE_* constants. For now we have to do smthng like this in migrations to add UUID columns instead of $b->uuidPk()->notNull():

    public function __construct(private ConnectionInterface $db)
    {
    }

    public function up(MigrationBuilder $b): void
    {
        $b->createTable('table_name', [
            'id' => $this->db->getSchema()->createColumn(SchemaInterface::TYPE_UUID_PK)->notNull(),
        ]);
    }

Task steps:

  • Find out all such types
  • Add corresponding methods to the MigrationBuilder class
@samdark samdark added the type:enhancement Enhancement label Nov 2, 2023
viktorprogger added a commit that referenced this issue Dec 21, 2023
@viktorprogger viktorprogger mentioned this issue Dec 21, 2023
@vjik
Copy link
Member

vjik commented Jan 6, 2024

It remains to implement:

  • TYPE_UPK
  • TYPE_UBIGPK

@vjik vjik added the good first issue Simple enough issue to start with. label Jan 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Simple enough issue to start with. type:enhancement Enhancement
Projects
None yet
Development

No branches or pull requests

3 participants