Rename database tables
caution
If you already have tables created by SuperTokens, and then you rename them, SuperTokens will create new tables. So please be sure to migrate the data from the existing one to the new one.
You can add a prefix to all table names that are managed by SuperTokens. This way, all of them will be renamed in a way that have no clashes with your tables.
For example, two tables created by SuperTokens are called emailpassword_users
and thirdparty_users
. If you add a prefix to them (something like "my_prefix"
), then the tables will be renamed to my_prefix_emailpassword_users
and my_prefix_thirdparty_users
.
For MySQL
docker run \
-p 3567:3567 \
// highlight-next-line
-e MYSQL_TABLE_NAMES_PREFIX="my_prefix" \
-d registry.supertokens.io/supertokens/supertokens-mysql
For PostgreSQL
docker run \
-p 3567:3567 \
// highlight-next-line
-e POSTGRESQL_TABLE_NAMES_PREFIX="my_prefix" \
-d registry.supertokens.io/supertokens/supertokens-postgresql
For MongoDB
docker run \
-p 3567:3567 \
// highlight-next-line
-e MONGODB_COLLECTION_NAMES_PREFIX="my_prefix" \
-d registry.supertokens.io/supertokens/supertokens-mongodb