mozilla-services / mozilla-services/syncstorage-rs

Add Migrations Table to Tokenserver envs

Open
#2,247 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1.8k
Forks
86
Avg merge
2d 17h
Merged PRs (30d)
21

Description

We currently default to disabling db migrations in Tokenserver (SYNC_TOKENSERVER__RUN_MIGRATIONS=false) as the migrations were only created for the Rust rewrite and we already had pre-existing databases in our prod/etc. environments.

Ideally we would switch this to default to true: to do this safely we should add the diesel migrations table to these environments (as if the migrations had already been ran, basically the __diesel_schema_migrations table), which would let us safely enable migrations on these environments in the future.

This would enable the use of migrations on our prod/etc. environments in the future and improve the default setting for other environments (such as self hosters, enterprise).

┆Issue is synchronized with this Jira Task

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Tokenserver environment configuration that sets SYNC_TOKENSERVER__RUN_MIGRATIONS and identifying the prod and other environments covered by this task. Verify how the __diesel_schema_migrations table should be introduced without applying existing migrations; done means the listed environments contain the table and can safely enable migrations later.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.