1
0
mirror of https://github.com/gamaio/lobli.git synced 2024-12-22 03:32: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:
alopexc0de 2014-08-15 18:51:45 -04:00
parent f5f143d2e6
commit 0836e64c80
No known key found for this signature in database
GPG Key ID: 48E847F18074C953

View File

@ -1,8 +1,15 @@
<?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;
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";
$redis = new Redis();