Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Handle Primary Keys #5

Closed
demonking opened this issue Dec 5, 2019 · 4 comments
Closed

Handle Primary Keys #5

demonking opened this issue Dec 5, 2019 · 4 comments
Labels
generator-feature Functionality missing from the generator
Milestone

Comments

@demonking
Copy link
Contributor

demonking commented Dec 5, 2019

I don't know , how it is with other programmers, but i think primary keys are mandatory to an api.
The current problem with openapi is, that there is no support for it, but the discussion was started 2 years ago.

OAI/OpenAPI-Specification#587

Maybe implement an extension property?

Edit:
We will need Primary Keys for foreign keys :)

@cebe
Copy link
Owner

cebe commented Dec 6, 2019

Currently the generator is implemented by assuming that the primary key is always id:

'link' => ['id' => $dbName], // TODO pk may not be 'id'

protected function getDbType($name, $schema)
{
if ($name === 'id') {
return 'pk';
}

of course that could be improved.

@cebe cebe added the generator-feature Functionality missing from the generator label Dec 6, 2019
@cebe
Copy link
Owner

cebe commented Aug 3, 2020

@Insolita is this solved by #9?

@cebe cebe added this to the 2.0 milestone Aug 3, 2020
@Insolita
Copy link
Collaborator

Insolita commented Aug 3, 2020

@cebe
Copy link
Owner

cebe commented Aug 3, 2020

perfect, thanks!

@cebe cebe closed this as completed Aug 3, 2020
cebe pushed a commit that referenced this issue Jan 5, 2023
…does-not-generate-migration-with-default-in-mariadb

Fix #115
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
generator-feature Functionality missing from the generator
Projects
None yet
Development

No branches or pull requests

3 participants