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

chore: implement tag name #1438

Merged
merged 4 commits into from
Jan 9, 2025
Merged

chore: implement tag name #1438

merged 4 commits into from
Jan 9, 2025

Conversation

cre8ivejp
Copy link
Member

@cre8ivejp cre8ivejp commented Jan 9, 2025

Part of #1090

Things done

  • Added name column to tag table
  • Copy the id value to the name column
  • Changed to use UUID in the id column
  • Changed the tag table primary key to id
  • Added a unique constraint for the tag name
mysql> select * from tag limit 2;
+--------------------------------------+---------+------------+------------+-----------------------+----------------+-------------+
| id                                   | name    | created_at | updated_at | environment_namespace | environment_id | entity_type |
+--------------------------------------+---------+------------+------------+-----------------------+----------------+-------------+
| 185e8f8d-9d3b-4f64-b008-1ef5ddbd05f0 | ios     | 1736408568 | 1736408725 |                       | demo           |           1 |
| 68916d2c-904a-4df1-810f-2ea856372bc0 | android | 1736404853 | 1736407284 |                       | demo           |           1 |
+--------------------------------------+---------+------------+------------+-----------------------+----------------+-------------+
2 rows in set (0.01 sec)


CREATE TABLE `tag` (
  `id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `created_at` bigint NOT NULL,
  `updated_at` bigint NOT NULL,
  `environment_namespace` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
  `environment_id` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `entity_type` int NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`,`environment_id`,`entity_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci

Screenshot 2025-01-09 at 5 03 10 PM

cre8ivejp and others added 3 commits January 9, 2025 16:54
Signed-off-by: Alessandro Yuichi Okimoto <[email protected]>
Signed-off-by: Alessandro Yuichi Okimoto <[email protected]>
Signed-off-by: Alessandro Yuichi Okimoto <[email protected]>
@cre8ivejp cre8ivejp marked this pull request as ready for review January 9, 2025 08:00
@cre8ivejp cre8ivejp requested a review from kentakozuka as a code owner January 9, 2025 08:00
@cre8ivejp cre8ivejp requested review from hvn2k1 and Ubisoft-potato and removed request for kentakozuka January 9, 2025 08:00
Copy link
Collaborator

@Ubisoft-potato Ubisoft-potato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!!

Copy link
Contributor

@hvn2k1 hvn2k1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@cre8ivejp cre8ivejp merged commit 62a7635 into main Jan 9, 2025
22 checks passed
@cre8ivejp cre8ivejp deleted the chore-tags-name branch January 9, 2025 08:57
steveninhle pushed a commit that referenced this pull request Jan 17, 2025
Signed-off-by: Alessandro Yuichi Okimoto <[email protected]>
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

Successfully merging this pull request may close these issues.

4 participants