This repository has been archived by the owner on Sep 30, 2024. It is now read-only.
Add CampaignSpecs & ChangesetSpecs tables, type definitions and campaigns.Store support #11711
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Merge target of this PR is https://github.com/sourcegraph/sourcegraph/pull/11675, which will contain the new campaigns workflow and allows us to merge without breaking master.
This is the next step to build up the necessary CRUD pieces and adds:
campaign_specs
table, aCampaignSpec
type definition and methods incampaigns.Store
ChangesetSpec
The schema is:
campaign
can have onecampaign_spec
campaign_spec
can have manychangeset_spec
Most notable is that
changeset_specs.campaign_spec_id
is nullable so that users can createChangesetSpecs
individually and then attach them toCampaignSpecs
.And both tables have a new
rand_id
column that contains a short, unguessable text ID that we can use as an external GraphQL node ID for both.Other than that: this is just the usual boilerplate that we used before. Major difference is that I made the tests a bit cleaner and created separate files (!) which I think we should do for the other tables too. It's far easier to work with.