Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

Commit fe16480

Browse files
authored
Migration: Add Stripe_id to Plan Model (#481)
* add plan migration * make field optional
1 parent b38e7f3 commit fe16480

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Generated by Django 4.2.16 on 2025-01-16 22:18
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
dependencies = [
8+
("codecov_auth", "0063_tier_plan"),
9+
]
10+
11+
operations = [
12+
migrations.AddField(
13+
model_name="plan",
14+
name="stripe_id",
15+
field=models.CharField(blank=True, max_length=255, null=True),
16+
),
17+
]

shared/django_apps/codecov_auth/models.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1+
import binascii
12
import logging
23
import os
34
import uuid
45
from dataclasses import asdict
56
from datetime import datetime
67
from hashlib import md5
7-
from typing import Self, Optional
8+
from typing import Optional, Self
89

9-
import binascii
1010
from django.contrib.postgres.fields import ArrayField, CITextField
1111
from django.contrib.sessions.models import Session as DjangoSession
1212
from django.db import models
@@ -1017,8 +1017,9 @@ class Plan(BaseModel):
10171017
marketing_name = models.CharField(max_length=255)
10181018
max_seats = models.IntegerField(null=True, blank=True)
10191019
monthly_uploads_limit = models.IntegerField(null=True, blank=True)
1020-
paid_plan = models.BooleanField(default=False)
10211020
name = models.CharField(max_length=255, unique=True)
1021+
paid_plan = models.BooleanField(default=False)
1022+
stripe_id = models.CharField(max_length=255, null=True, blank=True)
10221023

10231024
class Meta:
10241025
app_label = CODECOV_AUTH_APP_LABEL

0 commit comments

Comments
 (0)