Skip to content

Commit 04b3441

Browse files
authored
feat(preprod): Perform actual extras column drop (#93466)
Second step of the plan in #93388 Won't merge until the first PR is fully deployed.
1 parent ee8b8e9 commit 04b3441

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

migrations_lockfile.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ monitors: 0006_add_is_upserting
1919

2020
nodestore: 0001_squashed_0002_nodestore_no_dictfield
2121

22-
preprod: 0002_drop_sentry_jsonfield
22+
preprod: 0003_drop_sentry_jsonfield_actual
2323

2424
replays: 0001_squashed_0005_drop_replay_index
2525

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
from sentry.new_migrations.migrations import CheckedMigration
2+
from sentry.new_migrations.monkey.fields import SafeRemoveField
3+
from sentry.new_migrations.monkey.state import DeletionAction
4+
5+
6+
class Migration(CheckedMigration):
7+
# This flag is used to mark that a migration shouldn't be automatically run in production.
8+
# This should only be used for operations where it's safe to run the migration after your
9+
# code has deployed. So this should not be used for most operations that alter the schema
10+
# of a table.
11+
# Here are some things that make sense to mark as post deployment:
12+
# - Large data migrations. Typically we want these to be run manually so that they can be
13+
# monitored and not block the deploy for a long period of time while they run.
14+
# - Adding indexes to large tables. Since this can take a long time, we'd generally prefer to
15+
# run this outside deployments so that we don't block them. Note that while adding an index
16+
# is a schema change, it's completely safe to run the operation after the code has deployed.
17+
# Once deployed, run these manually via: https://develop.sentry.dev/database-migrations/#migration-deployment
18+
19+
is_post_deployment = False
20+
21+
dependencies = [
22+
("preprod", "0002_drop_sentry_jsonfield"),
23+
]
24+
25+
operations = [
26+
SafeRemoveField(
27+
model_name="preprodartifact",
28+
name="extras",
29+
deletion_action=DeletionAction.DELETE,
30+
),
31+
]

0 commit comments

Comments
 (0)