Skip to content

Commit

Permalink
Merge pull request #184 from seanmorley15/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
seanmorley15 authored Aug 11, 2024
2 parents a6041ec + 2425107 commit a656889
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Generated by Django 5.0.8 on 2024-08-11 12:59

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('adventures', '0001_initial'),
]

operations = [
migrations.RenameField(
model_name='adventure',
old_name='id',
new_name='temp_id',
),
migrations.RenameField(
model_name='checklist',
old_name='id',
new_name='temp_id',
),
migrations.RenameField(
model_name='checklistitem',
old_name='id',
new_name='temp_id',
),
migrations.RenameField(
model_name='collection',
old_name='id',
new_name='temp_id',
),
migrations.RenameField(
model_name='note',
old_name='id',
new_name='temp_id',
),
migrations.RenameField(
model_name='transportation',
old_name='id',
new_name='temp_id',
),
]
24 changes: 12 additions & 12 deletions backend/server/adventures/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@


class Adventure(models.Model):
id = models.AutoField(primary_key=True)
temp_id = models.UUIDField(default=uuid.uuid4, editable=True, unique=True, null=True, blank=True)
#id = models.AutoField(primary_key=True)
temp_id = models.UUIDField(default=uuid.uuid4, editable=False, unique=True, primary_key=True)
user_id = models.ForeignKey(
User, on_delete=models.CASCADE, default=default_user_id)
type = models.CharField(max_length=100, choices=ADVENTURE_TYPES)
Expand Down Expand Up @@ -64,8 +64,8 @@ def __str__(self):
return self.name

class Collection(models.Model):
id = models.AutoField(primary_key=True)
temp_id = models.UUIDField(default=uuid.uuid4, editable=True, unique=True, null=True, blank=True)
#id = models.AutoField(primary_key=True)
temp_id = models.UUIDField(default=uuid.uuid4, editable=False, unique=True, primary_key=True)
user_id = models.ForeignKey(
User, on_delete=models.CASCADE, default=default_user_id)
name = models.CharField(max_length=200)
Expand All @@ -89,8 +89,8 @@ def __str__(self):
return self.name

class Transportation(models.Model):
id = models.AutoField(primary_key=True)
temp_id = models.UUIDField(default=uuid.uuid4, editable=True, unique=True, null=True, blank=True)
#id = models.AutoField(primary_key=True)
temp_id = models.UUIDField(default=uuid.uuid4, editable=False, unique=True, primary_key=True)
user_id = models.ForeignKey(
User, on_delete=models.CASCADE, default=default_user_id)
type = models.CharField(max_length=100, choices=TRANSPORTATION_TYPES)
Expand Down Expand Up @@ -118,8 +118,8 @@ def __str__(self):
return self.name

class Note(models.Model):
id = models.AutoField(primary_key=True)
temp_id = models.UUIDField(default=uuid.uuid4, editable=True, unique=True, null=True, blank=True)
#id = models.AutoField(primary_key=True)
temp_id = models.UUIDField(default=uuid.uuid4, editable=False, unique=True, primary_key=True)
user_id = models.ForeignKey(
User, on_delete=models.CASCADE, default=default_user_id)
name = models.CharField(max_length=200)
Expand All @@ -142,8 +142,8 @@ def __str__(self):
return self.name

class Checklist(models.Model):
id = models.AutoField(primary_key=True)
temp_id = models.UUIDField(default=uuid.uuid4, editable=True, unique=True, null=True, blank=True)
# id = models.AutoField(primary_key=True)
temp_id = models.UUIDField(default=uuid.uuid4, editable=False, unique=True, primary_key=True)
user_id = models.ForeignKey(
User, on_delete=models.CASCADE, default=default_user_id)
name = models.CharField(max_length=200)
Expand All @@ -164,8 +164,8 @@ def __str__(self):
return self.name

class ChecklistItem(models.Model):
id = models.AutoField(primary_key=True)
temp_id = models.UUIDField(default=uuid.uuid4, editable=True, unique=True, null=True, blank=True)
#id = models.AutoField(primary_key=True)
temp_id = models.UUIDField(default=uuid.uuid4, editable=False, unique=True, primary_key=True)
user_id = models.ForeignKey(
User, on_delete=models.CASCADE, default=default_user_id)
name = models.CharField(max_length=200)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Generated by Django 5.0.8 on 2024-08-11 12:59

import uuid
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('users', '0003_remove_customuser_id_customuser_uuid'),
]

operations = [
migrations.AddField(
model_name='customuser',
name='id',
field=models.BigAutoField(auto_created=True, default=None, primary_key=True, serialize=False, verbose_name='ID'),
preserve_default=False,
),
migrations.AlterField(
model_name='customuser',
name='uuid',
field=models.UUIDField(blank=True, default=uuid.uuid4, null=True, unique=True),
),
]

0 comments on commit a656889

Please sign in to comment.