Migrate existing project to use Databunker

If you intend to integrate Databunker with your existing project, you’ll need to save customer personal records in Databunker. You can use user token, user email, user login, phone number, or a custom index to look for user details stored in Databunker.

Converting a sample project

Take a look at the following database schema. Instead of storing user records in the users table, they will be securely stored in Databunker.

Original schema

Method 1: simple database reorganization

You will only need to modify the users table. Remove all personal data from this table, keeping just the original userid/id column, and add a usertoken column. The usertoken will link to the user UUID token generated by Databunker.

This method works well if your userid column is used in many tables and you have a huge database.

A disadvantage of this method is that each user will have two identities: one userid and one usertoken.

Simple method

Method 2: full database reorganization

You will have to modify all tables that use the userid column and use usertoken column instead. The usertoken will point to the user UUID token generated by Databunker.

This method will require more changes on your database level and in your application code.

Full reorganization