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

build(database): target the pr branch when applying migrations #78

Merged
merged 1 commit into from
Jun 23, 2024

Conversation

tericcabrel
Copy link
Owner

No description provided.

@tericcabrel tericcabrel self-assigned this Jun 23, 2024
@tericcabrel tericcabrel force-pushed the remove-favorite-column branch from 51dbbb2 to 787d3d3 Compare June 23, 2024 15:15
Repository owner deleted a comment from github-actions bot Jun 23, 2024
@tericcabrel tericcabrel force-pushed the remove-favorite-column branch from 787d3d3 to 9f5a87f Compare June 23, 2024 15:16
Copy link
Contributor

Deploy request opened: https://app.planetscale.com/teco/core-db/deploy-requests/8

🚨 You are dropping a column. Before running the migration make sure to do the following:

  1. Deploy app changes to ensure the column is no longer being used.
  2. Once you've verified it's no used, run the deploy request.
 CREATE TABLE `folders` (
 	`id` varchar(50) NOT NULL,
 	`user_id` varchar(50) NOT NULL,
 	`parent_id` varchar(191),
 	`name` varchar(255) NOT NULL,
-	`is_favorite` tinyint(1) NOT NULL DEFAULT '0',
 	`created_at` datetime(3) NOT NULL DEFAULT current_timestamp(3),
 	`updated_at` datetime(3) NOT NULL,
 	`path` text,
 	`category` enum('visible', 'favorite', 'archived', 'hidden') NOT NULL DEFAULT 'visible',
 	PRIMARY KEY (`id`),
 	UNIQUE KEY `folders_user_id_parent_id_name_key` (`user_id`, `parent_id`, `name`),
 	KEY `folders_name_idx` (`name`),
-	KEY `folders_is_favorite_idx` (`is_favorite`),
 	KEY `folders_user_id_idx` (`user_id`),
 	KEY `folders_parent_id_idx` (`parent_id`),
+	KEY `folders_category_idx` (`category`)
 ) ENGINE InnoDB,
   CHARSET utf8mb4,
   COLLATE utf8mb4_unicode_ci;

Repository owner deleted a comment from github-actions bot Jun 23, 2024
@tericcabrel tericcabrel merged commit 7c3b253 into main Jun 23, 2024
5 checks passed
@tericcabrel tericcabrel deleted the remove-favorite-column branch June 23, 2024 15:18
tericcabrel added a commit that referenced this pull request Jun 23, 2024
* chore(database): remove isfavorite column

* fix: tests in the ci
build(database): target the pr branch when applying migrations (#72)

* build(database): target the pr branch when applying migrations

* fix: ci

* fix: ci

* fix: ci

* fix: ci
build(database): target the pr branch when applying migrations (#73)


build(database): target the pr branch when applying migrations (#75)


build(database): target the pr branch when applying migrations (#76)


build(database): target the pr branch when applying migrations (#77)


build(database): target the pr branch when applying migrations (#78)
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.

1 participant