Migration Utility for 1.0


#1

I have posted some of my initial work on the migration utility from 0.8 to 1.0 here: https://github.com/drone/drone-migrate

Why is this necessary? The database changed significantly and sqlite does not support a number of ddl operations. Furthermore the migration requires fetching some data from source control. I also plan to enable secret encryption with the migration utility (now that we support encrypted columns).

When will it be finished? I cannot provide timeline. I am currently focused on fixing bugs and finalizing the 1.0 release and updating documentation. Once these tasks are complete, I can refocus my attention to the migration utility. I have posted the migration utility code to GitHub in case teams want to help accelerate progress through contribution.

How does it work?. See the readme.

I want to stress that this is a work in progress. I am posting it now for teams that have expressed interest. The migration utility may help you partially migrate to 1.0 today. If you need a full migration, you will need to wait for 1.0-final, or better yet, send a pull request :slight_smile:

So far, the migration utility is able to:

  1. Migrate the user table
  2. Migrate the repository table
  3. Fetch some missing repository data from the source code management system (e.g. GitHub)

The migration utility cannot yet:

  1. Migrate the builds table
  2. Migrate the secrets table
  3. Migrate the logs table
  4. Repair webhooks

This means you will need to manually de-activate and re-activate a repository to repair the webhooks. This migration utility should be able to handle this eventually.

Note that the migration utility is for the database only. You can use drone convert command to convert the yaml file to the new format. Converting the yaml file is entirely optional, however, since the Drone 1.0 server is (mostly) backward compatible with 0.8 yaml files.


#2