pscale-workflow-helper-scripts icon indicating copy to clipboard operation
pscale-workflow-helper-scripts copied to clipboard

Test /ps-attach and /ps-update

Open jonico opened this issue 2 years ago • 34 comments

Fixes #20

jonico avatar May 18 '22 14:05 jonico

/ps-attach https://app.planetscale.com/planetscale-demo/matrix-demos-jonico/deploy-requests/111

jonico avatar May 18 '22 14:05 jonico

👋 jonico, attaching deploy request https://app.planetscale.com/planetscale-demo/matrix-demos-jonico/deploy-requests/111 to Git branch test-ps-attach-and-update now ...

You can watch the progress and authorize access here.

github-actions[bot] avatar May 18 '22 14:05 github-actions[bot]

Deploy request and DB branch attached successfully :tada:

:computer: pscale CLI commands for local access
pscale shell "matrix-demos-jonico" "combined-key" --org "planetscale-demo"
pscale connect "matrix-demos-jonico" "combined-key" --org "planetscale-demo"
📖 Calculated schema changes:

-CREATE TABLE `tutorial_tbl` (
-  `tutorial_id` int NOT NULL AUTO_INCREMENT,
-  `tutorial_title` varchar(100) NOT NULL,
-  `tutorial_author` varchar(40) NOT NULL,
-  `submission_date` date DEFAULT NULL,
-  PRIMARY KEY (`tutorial_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

github-actions[bot] avatar May 18 '22 14:05 github-actions[bot]

/ps-update

jonico avatar May 18 '22 14:05 jonico

👋 jonico, updating information of Git branch test-ps-attach-and-update now ...

You can watch the progress and authorize access here.

github-actions[bot] avatar May 18 '22 14:05 github-actions[bot]

Updated database branch (info) successfully :tada:

:computer: pscale CLI commands for local access
pscale shell "matrix-demos-jonico" "combined-key" --org "planetscale-demo"
pscale connect "matrix-demos-jonico" "combined-key" --org "planetscale-demo"
📖 Calculated schema changes:

-CREATE TABLE `tutorial_tbl` (
-  `tutorial_id` int NOT NULL AUTO_INCREMENT,
-  `tutorial_title` varchar(100) NOT NULL,
-  `tutorial_author` varchar(40) NOT NULL,
-  `submission_date` date DEFAULT NULL,
-  PRIMARY KEY (`tutorial_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

 CREATE TABLE `pixel_matrix` (
   `id` bigint NOT NULL,
   `environment` varchar(10) NOT NULL,
   `cell` varchar(10) NOT NULL,
   `pixel_data` longtext NOT NULL,
   `operation` varchar(10) DEFAULT NULL,
   PRIMARY KEY (`id`),
   KEY `environment` (`environment`),
   KEY `cell` (`cell`),
   KEY `environment_operation` (`environment`,`operation`),
   KEY `id` (`id`,`environment`),
-  KEY `environment_2` (`environment`,`id`),
-  KEY `environment_3` (`environment`,`id`),
-  KEY `id_2` (`id`,`environment`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

github-actions[bot] avatar May 18 '22 14:05 github-actions[bot]

/ps-update "ALTER TABLE pixel_matrix ADD COLUMN counter BIGINT NOT NULL DEFAULT 1;"

jonico avatar May 18 '22 14:05 jonico

👋 jonico, updating information and database schema of Git branch test-ps-attach-and-update now ...

You can watch the progress and authorize access here.

github-actions[bot] avatar May 18 '22 14:05 github-actions[bot]

Updating failed for branch test-ps-attach-and-update :cry:. View error logs.

Timed out

github-actions[bot] avatar May 18 '22 14:05 github-actions[bot]

/ps-update "ALTER TABLE swag_winners ADD COLUMN counter BIGINT NOT NULL DEFAULT 1"

jonico avatar May 18 '22 14:05 jonico

👋 jonico, updating information and database schema of Git branch test-ps-attach-and-update now ...

You can watch the progress and authorize access here.

github-actions[bot] avatar May 18 '22 14:05 github-actions[bot]

Updating failed for branch test-ps-attach-and-update :cry:. View error logs.

No keyspace selected

github-actions[bot] avatar May 18 '22 14:05 github-actions[bot]

/ps-update "use matrix-demos-jonico; ALTER TABLE swag_winners ADD COLUMN counter BIGINT NOT NULL DEFAULT 1"

jonico avatar May 18 '22 14:05 jonico

👋 jonico, updating information and database schema of Git branch test-ps-attach-and-update now ...

You can watch the progress and authorize access here.

github-actions[bot] avatar May 18 '22 14:05 github-actions[bot]

Updated database branch (info) successfully :tada:

:computer: pscale CLI commands for local access
pscale shell "matrix-demos-jonico" "combined-key" --org "planetscale-demo"
pscale connect "matrix-demos-jonico" "combined-key" --org "planetscale-demo"
📖 Calculated schema changes:

 CREATE TABLE `swag_winners` (
   `issue_id` bigint NOT NULL,
   `example_url` varchar(255) NOT NULL,
   `tweet_url` varchar(255) NOT NULL,
+  `counter` bigint NOT NULL DEFAULT '1',
   PRIMARY KEY (`issue_id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-CREATE TABLE `tutorial_tbl` (
-  `tutorial_id` int NOT NULL AUTO_INCREMENT,
-  `tutorial_title` varchar(100) NOT NULL,
-  `tutorial_author` varchar(40) NOT NULL,
-  `submission_date` date DEFAULT NULL,
-  PRIMARY KEY (`tutorial_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

 CREATE TABLE `pixel_matrix` (
   `id` bigint NOT NULL,
   `environment` varchar(10) NOT NULL,
   `cell` varchar(10) NOT NULL,
   `pixel_data` longtext NOT NULL,
   `operation` varchar(10) DEFAULT NULL,
   PRIMARY KEY (`id`),
   KEY `environment` (`environment`),
   KEY `cell` (`cell`),
   KEY `environment_operation` (`environment`,`operation`),
   KEY `id` (`id`,`environment`),
-  KEY `environment_2` (`environment`,`id`),
-  KEY `environment_3` (`environment`,`id`),
-  KEY `id_2` (`id`,`environment`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

github-actions[bot] avatar May 18 '22 14:05 github-actions[bot]

/ps-create tabs-test "ALTER TABLE hp_character DROP is_wizard, DROP ancestry, DROP wand_id, DROP patronus, DROP is_hogwarts_student, DROP is_hogwarts_staff;"

jonico avatar Jun 01 '22 08:06 jonico

Script .pscale/env/ps-env-test-ps-attach-and-update.sh already exists, please use /ps-update "<DDL>" to update existing env.

github-actions[bot] avatar Jun 01 '22 08:06 github-actions[bot]

/ps-delete

jonico avatar Jun 01 '22 08:06 jonico

👋 jonico, deleting DB branch associated with Git branch test-ps-attach-and-update now ...

You can watch the progress and authorize access here.

github-actions[bot] avatar Jun 01 '22 08:06 github-actions[bot]

Deleted database branch successfully :tada:

  • :seedling: DB-Branch: combined-key

github-actions[bot] avatar Jun 01 '22 08:06 github-actions[bot]

/ps-create "ALTER TABLE pixel_matrix ADD COLUMN counter BIGINT NOT NULL DEFAULT 1;"

jonico avatar Jun 01 '22 08:06 jonico

Script .pscale/env/ps-env-test-ps-attach-and-update.sh already exists, please use /ps-update "<DDL>" to update existing env.

github-actions[bot] avatar Jun 01 '22 08:06 github-actions[bot]

/ps-create "ALTER TABLE pixel_matrix ADD COLUMN counter BIGINT NOT NULL DEFAULT 1;"

jonico avatar Jun 01 '22 08:06 jonico

👋 jonico, creating DB branch test-ps-attach-and-update for Git branch test-ps-attach-and-update now ...

You can watch the progress and authorize access here.

github-actions[bot] avatar Jun 01 '22 08:06 github-actions[bot]

Creating PS branch and DR failed for branch test-ps-attach-and-update :cry:. View error logs.

github-actions[bot] avatar Jun 01 '22 08:06 github-actions[bot]

/ps-create "ALTER TABLE hp_character DROP is_wizard, DROP ancestry, DROP wand_id, DROP patronus, DROP is_hogwarts_student, DROP is_hogwarts_staff;"

jonico avatar Jun 01 '22 08:06 jonico

👋 jonico, creating DB branch test-ps-attach-and-update for Git branch test-ps-attach-and-update now ...

You can watch the progress and authorize access here.

github-actions[bot] avatar Jun 01 '22 08:06 github-actions[bot]

Database branch and deploy request created successfully :tada:

:computer: pscale CLI commands for local access
pscale shell "harry-potter-jonico" "test-ps-attach-and-update" --org "planetscale-demo"
pscale connect "harry-potter-jonico" "test-ps-attach-and-update" --org "planetscale-demo"
📖 Calculated schema changes:

 CREATE TABLE `hp_character` (
 %09`id` int NOT NULL AUTO_INCREMENT,
 %09`full_name` varchar(240),
 %09`species` varchar(40),
 %09`gender` varchar(40),
 %09`house` varchar(40),
 %09`date_of_birth` varchar(40),
 %09`year_of_birth` int unsigned,
-%09`is_wizard` tinyint(1),
-%09`ancestry` varchar(40),
 %09`eye_colour` varchar(40),
 %09`hair_colour` varchar(40),
-%09`wand_id` int,
-%09`patronus` varchar(40),
-%09`is_hogwarts_student` tinyint(1),
-%09`is_hogwarts_staff` tinyint(1),
 %09`is_alive` tinyint(1),
 %09`image` varchar(240),
 %09PRIMARY KEY (`id`)
 ) ENGINE InnoDB,
   CHARSET utf8mb4,
   COLLATE utf8mb4_0900_ai_ci;

github-actions[bot] avatar Jun 01 '22 08:06 github-actions[bot]

/ps-update

jonico avatar Jun 01 '22 09:06 jonico

👋 jonico, updating information of Git branch test-ps-attach-and-update now ...

You can watch the progress and authorize access here.

github-actions[bot] avatar Jun 01 '22 09:06 github-actions[bot]