-
Notifications
You must be signed in to change notification settings - Fork 429
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add attribute to store identity overrides storage type (#3109)
- Loading branch information
1 parent
5033f37
commit c31322b
Showing
2 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
api/projects/migrations/0021_add_identity_overrides_storage_type.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,47 @@ | ||
# Generated by Django 3.2.23 on 2023-12-07 12:33 | ||
from django.apps.registry import Apps | ||
from django.db import migrations, models | ||
from django.db.backends.base.schema import BaseDatabaseSchemaEditor | ||
|
||
from projects.models import IdentityOverridesStorageType | ||
|
||
|
||
def apply_defaults(apps: Apps, schema_editor: BaseDatabaseSchemaEditor) -> None: | ||
apps.get_model("projects", "Project").objects.all().update( | ||
identity_overrides_storage_type=IdentityOverridesStorageType.IDENTITY_RECORD | ||
) | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("projects", "0020_add_environment_feature_state_version_logic"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="project", | ||
name="identity_overrides_storage_type", | ||
field=models.CharField( | ||
choices=[ | ||
("IDENTITY_RECORD", "Identity Record"), | ||
("FLAGSMITH_OVERRIDES", "Flagsmith Overrides"), | ||
], | ||
default=None, | ||
max_length=50, | ||
null=True, | ||
), | ||
), | ||
migrations.RunPython(apply_defaults, reverse_code=migrations.RunPython.noop), | ||
migrations.AlterField( | ||
model_name="project", | ||
name="identity_overrides_storage_type", | ||
field=models.CharField( | ||
choices=[ | ||
("IDENTITY_RECORD", "Identity Record"), | ||
("FLAGSMITH_OVERRIDES", "Flagsmith Overrides"), | ||
], | ||
default="IDENTITY_RECORD", | ||
max_length=50, | ||
), | ||
), | ||
] |
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
c31322b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
flagsmith-frontend-staging – ./frontend
flagsmith-frontend-staging-git-main-flagsmith.vercel.app
flagsmith-staging-frontend.vercel.app
flagsmith-frontend-staging-flagsmith.vercel.app
staging.flagsmith.com
c31322b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
docs – ./docs
docs-git-main-flagsmith.vercel.app
docs-flagsmith.vercel.app
docs.bullet-train.io
docs.flagsmith.com
c31322b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
flagsmith-frontend-preview – ./frontend
flagsmith-frontend-preview-git-main-flagsmith.vercel.app
flagsmith-frontend-production-native.vercel.app
flagsmith-frontend-preview-flagsmith.vercel.app