Migration from 1.0 to 2023 rewrite #1

Closed
opened 2023-07-04 21:39:42 +02:00 by bc1bb · 0 comments
bc1bb commented 2023-07-04 21:39:42 +02:00 (Migrated from github.com)

2023 rewrite will change database schema. To migrate database from old schema to new one:

ALTER TABLE `LINKS`
  CHANGE `id` `shorten` CHAR(12) NOT NULL,
  CHANGE `original` `original` CHAR(128) NOT NULL,
  CHANGE `time` `creation` INT(12) NOT NULL,
  ADD COLUMN `id` INT(12) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY;

RENAME TABLE LINKS TO links;
[2023 rewrite](https://github.com/bc1bb/OpenLink/tree/develop) will change database schema. To migrate database from old schema to new one: ```sql ALTER TABLE `LINKS` CHANGE `id` `shorten` CHAR(12) NOT NULL, CHANGE `original` `original` CHAR(128) NOT NULL, CHANGE `time` `creation` INT(12) NOT NULL, ADD COLUMN `id` INT(12) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY; RENAME TABLE LINKS TO links; ```
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
bc1bb/OpenLink#1
No description provided.