generated from hackforla/.github-hackforla-base-repo-template
-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
84 additions
and
1 deletion.
There are no files selected for viewing
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,53 @@ | ||
[ | ||
{ | ||
"uuid": 1, | ||
"occ_code": "11-2000", | ||
"title": "Management Occupations" | ||
}, | ||
{ | ||
"uuid": 2, | ||
"occ_code": "13-0000", | ||
"title": "Business and Financial Operations Occupations" | ||
}, | ||
{ | ||
"uuid": 3, | ||
"occ_code": "15-0000", | ||
"title": "Computer and Mathematical Occupations" | ||
}, | ||
{ | ||
"uuid": 4, | ||
"occ_code": "17-0000", | ||
"title": "Architecture and Engineering Occupations" | ||
}, | ||
{ | ||
"uuid": 5, | ||
"occ_code": "19-0000", | ||
"title": "Life, Physical, and Social Science Occupations" | ||
}, | ||
{ | ||
"uuid": 6, | ||
"occ_code": "21-0000", | ||
"title": "Community and Social Service Occupations" | ||
}, | ||
{ | ||
"uuid": 7, | ||
"occ_code": "23-0000", | ||
"title": "Legal Occupations" | ||
}, | ||
{ | ||
"uuid": 8, | ||
"occ_code": "25-0000", | ||
"title": "Educational Instruction and Library Occupations" | ||
}, | ||
{ | ||
"uuid": 9, | ||
"occ_code": "27-0000", | ||
"title": "Arts, Design, Entertainment, Sports, and Media Occupations" | ||
}, | ||
{ | ||
"uuid": 10, | ||
"occ_code": "29-0000", | ||
"title": "Healthcare Practitioners and Technical Occupations" | ||
} | ||
|
||
] |
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,30 @@ | ||
from django.db import migrations | ||
|
||
from core.models import SocMajor | ||
|
||
|
||
def forward(__code__, __reverse_code__): | ||
items = [ | ||
(1, "11-2000", "Management Occupations"), | ||
(2, "13-0000", "Business and Financial Operations Occupations"), | ||
(3, "15-0000", "Computer and Mathematical Occupations"), | ||
(4, "17-0000", "Architecture and Engineering Occupations"), | ||
(5, "19-0000", "Life, Physical, and Social Science Occupations"), | ||
(6, "21-0000", "Community and Social Service Occupations"), | ||
(7, "23-0000", "Legal Occupations"), | ||
(8, "25-0000", "Educational Instruction and Library Occupations"), | ||
(9, "27-0000", "Arts, Design, Entertainment, Sports, and Media Occupations"), | ||
(10, "29-0000", "Healthcare Practitioners and Technical Occupations"), | ||
] | ||
for uuid, occ_code, title in items: | ||
SocMajor.objects.create(uuid=uuid, occ_code=occ_code, title=title) | ||
|
||
|
||
def reverse(__code__, __reverse_code__): | ||
SocMajor.objects.all().delete() | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [("data", "0005_checktype_seed")] | ||
|
||
operations = [migrations.RunPython(forward, reverse)] |
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 |
---|---|---|
@@ -1 +1 @@ | ||
0005_checktype_seed | ||
0006_socmajor_seed |