pscale-workflow-helper-scripts
pscale-workflow-helper-scripts copied to clipboard
Test /ps-attach and /ps-update
Fixes #20
/ps-attach https://app.planetscale.com/planetscale-demo/matrix-demos-jonico/deploy-requests/111
👋 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.
Deploy request and DB branch attached successfully :tada:
- :seedling: DB-Branch: combined-key
- :train2: Deploy request
- :lock: Branch connection info: One-time link
: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;
/ps-update
👋 jonico, updating information of Git branch test-ps-attach-and-update now ...
You can watch the progress and authorize access here.
Updated database branch (info) successfully :tada:
- :seedling: DB-Branch: combined-key
- :train2: Deploy request
: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;
/ps-update "ALTER TABLE pixel_matrix ADD COLUMN counter BIGINT NOT NULL DEFAULT 1;"
👋 jonico, updating information and database schema of Git branch test-ps-attach-and-update now ...
You can watch the progress and authorize access here.
/ps-update "ALTER TABLE swag_winners ADD COLUMN counter BIGINT NOT NULL DEFAULT 1"
👋 jonico, updating information and database schema of Git branch test-ps-attach-and-update now ...
You can watch the progress and authorize access here.
/ps-update "use matrix-demos-jonico; ALTER TABLE swag_winners ADD COLUMN counter BIGINT NOT NULL DEFAULT 1"
👋 jonico, updating information and database schema of Git branch test-ps-attach-and-update now ...
You can watch the progress and authorize access here.
Updated database branch (info) successfully :tada:
- :seedling: DB-Branch: combined-key
- :train2: Deploy request
: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;
/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;"
Script .pscale/env/ps-env-test-ps-attach-and-update.sh
already exists, please use /ps-update "<DDL>"
to update existing env.
/ps-delete
👋 jonico, deleting DB branch associated with Git branch test-ps-attach-and-update now ...
You can watch the progress and authorize access here.
Deleted database branch successfully :tada:
- :seedling: DB-Branch: combined-key
/ps-create "ALTER TABLE pixel_matrix ADD COLUMN counter BIGINT NOT NULL DEFAULT 1;"
Script .pscale/env/ps-env-test-ps-attach-and-update.sh
already exists, please use /ps-update "<DDL>"
to update existing env.
/ps-create "ALTER TABLE pixel_matrix ADD COLUMN counter BIGINT NOT NULL DEFAULT 1;"
👋 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.
Creating PS branch and DR failed for branch test-ps-attach-and-update :cry:. View error logs.
/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, 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.
Database branch and deploy request created successfully :tada:
- :seedling: DB-Branch: test-ps-attach-and-update
- :train2: Deploy request
- :lock: Branch connection info: One-time link
: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;
/ps-update
👋 jonico, updating information of Git branch test-ps-attach-and-update now ...
You can watch the progress and authorize access here.