Skip to content

Commit

Permalink
Migration to Rename Skill and Add New Skill (#1525)
Browse files Browse the repository at this point in the history
* Fix typo in user skill and add a new skill

* Update care/users/migrations/0008_rename_skill_and_add_new_20230817_1937.py

Co-authored-by: Aakash Singh <[email protected]>

---------

Co-authored-by: Aakash Singh <[email protected]>
  • Loading branch information
Ashesh3 and sainak authored Aug 24, 2023
1 parent 4c98790 commit 20a575d
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generated by Django 4.2.2 on 2023-08-17 14:07

from django.db import migrations


def rename_skill_and_add_new(apps, schema_editor):
Skill = apps.get_model("users", "Skill")
Skill.objects.filter(name="Genreal Surgeon").update(name="General Surgeon")

Skill.objects.get_or_create(name="General Medicine")


class Migration(migrations.Migration):
dependencies = [
("users", "0007_alter_user_alt_phone_number_alter_user_phone_number"),
]

operations = [
migrations.RunPython(rename_skill_and_add_new),
]

0 comments on commit 20a575d

Please sign in to comment.