mirror of
https://github.com/gamaio/lobli.git
synced 2024-12-22 11:42:40 +00:00
Add some documentation to the migrator.
The SQL commands may or may not work for you. They worked for me and did what I wanted.
This commit is contained in:
parent
f5f143d2e6
commit
0836e64c80
@ -1,8 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
// You need an AI id, if you delete rows from your database (for example tos violation), I recommend resetting it.
|
||||||
|
// ALTER TABLE `links` DROP COLUMN `id`;
|
||||||
|
// ALTER TABLE `links` ADD COLUMN `id` int AUTO_INCREMENT PRIMARY KEY FIRST;
|
||||||
|
// These SQL commands will erase all your ids and add them again, giving you an easily indexed list of ids
|
||||||
|
// Take the last id from the table and put that in $ids. It should then add all your links to Redis.
|
||||||
|
// It is your job to do what you feel you need to for your sql table.
|
||||||
|
|
||||||
$ids = 461;
|
$ids = 461;
|
||||||
|
|
||||||
echo "mysql to redis migrator\nThis is very specific for the link shortener, and assumes 460 entries in table.\n";
|
echo "mysql to redis migrator\nThis is very specific for the link shortener, and assumes $ids entries in table.\n";
|
||||||
echo "Connecting to databases...\n";
|
echo "Connecting to databases...\n";
|
||||||
|
|
||||||
$redis = new Redis();
|
$redis = new Redis();
|
||||||
|
Loading…
Reference in New Issue
Block a user