-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add upload_token_required_for_public_repos, backfill and make non-nul…
…lable (#373) * add upload_token_required_for_public_repos, backfill and make non-nullable * risky migration part 1 * change update query around * remove second migration * split into 3 steps * one step
- Loading branch information
1 parent
a97eb0a
commit 88117b9
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
.../django_apps/codecov_auth/migrations/0060_owner_upload_token_required_for_public_repos.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Generated by Django 4.2.16 on 2024-10-02 00:21 | ||
|
||
from django.db import migrations, models | ||
|
||
from shared.django_apps.migration_utils import RiskyAddField | ||
|
||
|
||
class Migration(migrations.Migration): | ||
""" | ||
BEGIN; | ||
-- | ||
-- Add field upload_token_required_for_public_repos to owner | ||
-- | ||
ALTER TABLE "owners" ADD COLUMN "upload_token_required_for_public_repos" boolean DEFAULT true NOT NULL; | ||
ALTER TABLE "owners" ALTER COLUMN "upload_token_required_for_public_repos" DROP DEFAULT; | ||
COMMIT; | ||
""" | ||
|
||
dependencies = [ | ||
("codecov_auth", "0059_alter_accountsusers_options"), | ||
] | ||
|
||
operations = [ | ||
RiskyAddField( | ||
model_name="owner", | ||
name="upload_token_required_for_public_repos", | ||
field=models.BooleanField(default=True), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters