TaskBoard icon indicating copy to clipboard operation
TaskBoard copied to clipboard

migration instructions

Open olaulau opened this issue 5 years ago • 10 comments

Hi ;

is it possible to migrate from v0.3.1 to v1.0.1 ? is there any documentation ?

I tried to copy sqlite db but failed to authenticate. btw, the file has been renamed from taskboard.db to taskboard.sqlite.

Has the rewrite been done with migration concern or is it a complete new application ?

thanks.

olaulau avatar Jun 16 '20 16:06 olaulau

Yeah, sorry, I seem to have left that out of the README. In the tools directory is a script to migrate v0.3.x taskboard.db files to the new taskboard.sqlite schema.

All you need to do is copy your old DB into the tools directory, and run php tb-migrate.php to generate a new DB.

kiswa avatar Jun 16 '20 16:06 kiswa

the tool directory which is on the repo isn't in the release zip file. so we have to use the git project to do the migrate ?

olaulau avatar Jun 16 '20 16:06 olaulau

For the moment... yes, I suppose so. I'll update the packaging so the tools are included!

kiswa avatar Jun 16 '20 17:06 kiswa

I had some errors executing the script ... so I copied my old taskboard.db onto tool dir. do we have to generate a brand new taskboard.sqlite to do the migration ?

/var/www/html/TaskBoard_git/tools# php tb-migrate.php
Opening 'taskboard.db'...               Done.
Opening 'taskboard.sqlite'...PHP Warning:  unlink(taskboard.sqlite): No such file or directory in /var/www/html/TaskBoard_git/tools/tb-migrate.php on line 20
                Done.

 Creating new tables...                 Done.

 Migrating table `activity`...          5734 rows migrated.
 Migrating table `autoaction`...PHP Warning:  SQLite3::query(): Unable to prepare statement: 1, no such table: autoaction in /var/www/html/TaskBoard_git/tools/tb-migrate.php on line 140
PHP Fatal error:  Uncaught Error: Call to a member function numColumns() on boolean in /var/www/html/TaskBoard_git/tools/tb-migrate.php:142
Stack trace:
#0 /var/www/html/TaskBoard_git/tools/tb-migrate.php(214): TbMigrate->migrateTable('INSERT INTO aut...', Object(Closure))
#1 /var/www/html/TaskBoard_git/tools/tb-migrate.php(48): TbMigrate->migrateAutoAction()
#2 /var/www/html/TaskBoard_git/tools/tb-migrate.php(361): TbMigrate->migrate()
#3 {main}
  thrown in /var/www/html/TaskBoard_git/tools/tb-migrate.php on line 142

olaulau avatar Jun 16 '20 17:06 olaulau

Looks like I've got some updating to do for the migration script. If you're willing to provide me your taskboard.db file, it might help me figure out where the migration goes wrong. If not, I completely understand.

kiswa avatar Jun 16 '20 17:06 kiswa

I can't, sorry.

olaulau avatar Jun 16 '20 17:06 olaulau

same error today with master pull.

olaulau avatar Oct 19 '20 15:10 olaulau

seems that I don't have any autoaction table in my taskboard.db file ...

olaulau avatar Oct 19 '20 15:10 olaulau

works fine with commenting the concerned row.

olaulau avatar Oct 19 '20 16:10 olaulau

Yeah, this is still pending work. I'd be glad to accept a contribution that fixes migration.

kiswa avatar Oct 23 '20 12:10 kiswa