Feat: Add technicalName to views#2547
Conversation
4e3dfbb to
f5c0e46
Compare
1b8e351 to
5d0e084
Compare
8e53c2f to
0615d81
Compare
0615d81 to
ddf9e3b
Compare
|
@enjeck this is more or less parallel process. My PR is completely independent. |
aaade32 to
dbb4fc6
Compare
|
@enjeck yes ill aligh the design on column to be the same as view as talked with @nimishavijay |
dbb4fc6 to
89f1bdb
Compare
Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
89f1bdb to
c0fe714
Compare
|
if there is no technical_name value for view when updating no default is added for that view. |
| } | ||
|
|
||
| if ($view->getTechnicalName() === $technicalName) { | ||
| throw new BadRequestError('Technical name must be unique in the table.'); |
There was a problem hiding this comment.
unique technical name does not take effect, i can still safe the view with an existing technical name.
| * @throws BadRequestError | ||
| * @throws InternalError | ||
| */ | ||
| private function assertTechnicalNameUnique(int $tableId, string $technicalName, ?int $excludeCurrentViewId = null): void { |
There was a problem hiding this comment.
maybe we can remove the findAll and foreach uniqueness check and rely on the db unique index on (table_id, technical_name)? on create/update catch the constraint violation and return the same BadRequestError (“Technical name must be unique in the table.”).
| $result->closeCursor(); | ||
| } | ||
|
|
||
| $output->info('Version2011Date20260428000000: backfilled technical_name for ' . $updatedCount . ' views.'); |
There was a problem hiding this comment.
this also needs to be updated.
| /** | ||
| * @throws BadRequestError | ||
| */ | ||
| private function assertTechnicalNameValid(string $technicalName): void { |
There was a problem hiding this comment.
low importance but maybe a check also for the length of it, but nothing worth stopping to go forward.


This is similar to #1840/#2384 but for Views.
🚧 TODO