Skip to content

Commit

Permalink
Merge pull request #5 from rverchere/master
Browse files Browse the repository at this point in the history
Update to kanboard v1.0.34
  • Loading branch information
oliviermaridat authored Nov 21, 2016
2 parents d66f014 + cddd6f9 commit c343f60
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@ First get kanboard-sqlite2mysql:

git clone https://github.com/oliviermaridat/kanboard-sqlite2mysql
cd kanboard-sqlite2mysql
chmod u+x kanbord-sqlite2mysql.sh
chmod u+x kanbord-backup.sh
chmod u+x kanboard-sqlite2mysql.sh
chmod u+x kanboard-backup.sh

Then backup your Kanboard data:

./kanboard-backup.sh <Kanboard instance physical path>

And finally create the SQL dump file compatible with MySQL:

./kanbord-sqlite2mysql.sh <Kanboard instance physical path> -o db-mysql.sql
./kanboard-sqlite2mysql.sh <Kanboard instance physical path> -o db-mysql.sql

Or you can also directly apply it to the MySQL database of your choice:

./kanbord-sqlite2mysql.sh <Kanboard instance physical path> <MySQL DB name> [ -h <MySQL DB host> -u <MySQL DB user> -p ]
./kanboard-sqlite2mysql.sh <Kanboard instance physical path> <MySQL DB name> [ -h <MySQL DB host> -u <MySQL DB user> -p ]

Running this script may take 2 or 3 minutes.

Expand Down
4 changes: 4 additions & 0 deletions kanboard-sqlite2mysql.sh
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ createMysqlDump()
TRUNCATE TABLE plugin_schema_versions;
SET FOREIGN_KEY_CHECKS = 1;' > ${OUTPUT_FILE}

echo 'ALTER TABLE `tasks` CHANGE `column_id` `column_id` INT( 11 ) NULL;' >> ${OUTPUT_FILE}

sqlite_dump_data ${sqliteDbFile} >> ${OUTPUT_FILE}

echo 'ALTER TABLE users DROP COLUMN is_admin;
Expand All @@ -198,6 +200,8 @@ createMysqlDump()
ALTER TABLE project_has_users DROP COLUMN id;
ALTER TABLE project_has_users DROP COLUMN is_owner;' >> ${OUTPUT_FILE}

echo 'ALTER TABLE `tasks` CHANGE `column_id` `column_id` INT( 11 ) NOT NULL;' >> ${OUTPUT_FILE}

# For MySQL, we need to double the anti-slash (\\ instead of \)
# But we need to take care of Windows URL (e.g. C:\test\) in the JSON of project_activities (e.g. C:\test\" shall not become C:\\test\\" this will break the json...). Windows URL are transformed into Linux URL for this reason
cat ${OUTPUT_FILE} \
Expand Down

0 comments on commit c343f60

Please sign in to comment.