Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial Schema Creation for Age & Stratigraphy #5274

Merged
merged 114 commits into from
Oct 3, 2024
Merged
Changes from 1 commit
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
a8fdac2
stratigraphy-age-init
acwhite211 Aug 2, 2024
0975b5c
update query_co_in_time_range
acwhite211 Aug 2, 2024
26e2bc0
init datamodel
acwhite211 Aug 2, 2024
1509803
init django migration
acwhite211 Aug 2, 2024
5a7ccb9
temp
acwhite211 Aug 30, 2024
33df9b7
init age-strat schema without qb
acwhite211 Sep 13, 2024
97d35ac
remove other future qb code
acwhite211 Sep 13, 2024
c120c31
cleanup
acwhite211 Sep 13, 2024
b806ab3
Absolute age chnages
CarolineDenis Sep 13, 2024
3a2e8b4
Change filed relative age
CarolineDenis Sep 13, 2024
1a7f199
Chnage tectonic tree def
CarolineDenis Sep 13, 2024
c3be122
Change tectonic tree def
CarolineDenis Sep 13, 2024
239bc07
Chnage tree def item
CarolineDenis Sep 13, 2024
3b32d60
Chnage tectonic unit
CarolineDenis Sep 13, 2024
007ed2d
chnage relative age citation
CarolineDenis Sep 13, 2024
8e294ea
Chnage relative age attachment
CarolineDenis Sep 13, 2024
fbcf19c
Chnage absolute attachement
CarolineDenis Sep 13, 2024
9319ece
misc
CarolineDenis Sep 13, 2024
ba9edfc
Chnage db column name
CarolineDenis Sep 13, 2024
b3775ff
Change fields absoluteAge dataModel
CarolineDenis Sep 16, 2024
671db6d
Chnage fields relativeAge dataModel
CarolineDenis Sep 16, 2024
798afc2
Modify fields tectonicTreeDef dataModel
CarolineDenis Sep 16, 2024
b56c1da
Chnage fields TectonicTreeDefItem dataModel
CarolineDenis Sep 16, 2024
a322ee7
Chnage fields tectonicUnit dataModel
CarolineDenis Sep 16, 2024
ff3f426
Chnage dependency
CarolineDenis Sep 16, 2024
83f4287
misc
CarolineDenis Sep 16, 2024
b58ae28
Chnages in datamodel.py
CarolineDenis Sep 16, 2024
3104ad2
Modify age table in models.py
CarolineDenis Sep 16, 2024
77de5ec
Modify age attachment in models
CarolineDenis Sep 16, 2024
c3ceb77
Modify age citation in models
CarolineDenis Sep 16, 2024
c64aff1
Modify tectnoic tree def in models
CarolineDenis Sep 16, 2024
0109aaa
Modify tectonicTreeDefItem
CarolineDenis Sep 16, 2024
430141b
Modify tectonicUnit in models
CarolineDenis Sep 16, 2024
64fb807
Modify tectnoicUnit
CarolineDenis Sep 16, 2024
bc9aac3
Add new tables to schema config
CarolineDenis Sep 16, 2024
d2d09ba
Merge branch 'production' into issue-5178-1
acwhite211 Sep 18, 2024
dbb8860
temporarily change migration dependency
acwhite211 Sep 18, 2024
c69b8d1
initial qb age filtering operations back-end
acwhite211 Sep 18, 2024
4bf5759
Revert "initial qb age filtering operations back-end"
acwhite211 Sep 18, 2024
9f9aae3
Remove controlledVocab field
CarolineDenis Sep 19, 2024
6409468
Add yesno fields to age
CarolineDenis Sep 19, 2024
a7a738e
Chnage accepted
CarolineDenis Sep 19, 2024
7a110ab
Add unit
CarolineDenis Sep 19, 2024
b23a650
Typo
CarolineDenis Sep 19, 2024
0af753d
typo
CarolineDenis Sep 19, 2024
ae4083f
Add run migration operation
CarolineDenis Sep 20, 2024
31ee944
Add ageType picklist
CarolineDenis Sep 20, 2024
ee1e625
Add apps
CarolineDenis Sep 20, 2024
e1220bd
Add ageType picklist items
CarolineDenis Sep 20, 2024
3094f82
Revert picklist items
CarolineDenis Sep 20, 2024
2fe740b
Fix get model
CarolineDenis Sep 20, 2024
ba454c3
Test
CarolineDenis Sep 20, 2024
8ee360e
Fix indentation
CarolineDenis Sep 20, 2024
262284a
Rename tectonicTree to tectonicUnitTree
CarolineDenis Sep 23, 2024
fb950e5
Add missing files
CarolineDenis Sep 23, 2024
6941685
Fix tests
CarolineDenis Sep 23, 2024
8743a04
Chnage age type list
CarolineDenis Sep 23, 2024
375018c
Camel case new tables datamodel
CarolineDenis Sep 23, 2024
15a345c
Modify case in types.ts
CarolineDenis Sep 23, 2024
6d86d28
Modify format of description in schema config
CarolineDenis Sep 23, 2024
78af447
Format caption for in schema config
CarolineDenis Sep 23, 2024
b805196
Test add field absolute age to CO
CarolineDenis Sep 23, 2024
875e4eb
Remove collection field from age table
CarolineDenis Sep 24, 2024
cec8042
Add ages tables to CO
CarolineDenis Sep 24, 2024
b61a665
Fix test
CarolineDenis Sep 24, 2024
9504a3b
Fix order in test
CarolineDenis Sep 24, 2024
a863475
Typo
CarolineDenis Sep 24, 2024
4c148e8
Test
CarolineDenis Sep 24, 2024
66d546a
Add null value
CarolineDenis Sep 24, 2024
1e3e705
fix schemaconfig updates on new fields in existing tables
acwhite211 Sep 25, 2024
c20f245
schema config corrections
acwhite211 Sep 25, 2024
4c5d911
Start to add tectonic ranks
CarolineDenis Sep 26, 2024
12a2461
Fix parent node
CarolineDenis Sep 26, 2024
757a42e
Add rank creation def to migration operations
CarolineDenis Sep 26, 2024
1db737e
Formatting
CarolineDenis Sep 26, 2024
2c3761c
Chnage name def
CarolineDenis Sep 26, 2024
2338186
add fix_geo_schema_config_formatting in migration
acwhite211 Sep 27, 2024
b6872cb
fix revert_agetype_picklist and fix_geo_schema_config_formatting
acwhite211 Sep 27, 2024
1e129b2
typo fix
acwhite211 Sep 27, 2024
ac8fb11
Remove update of previous geo table for schema config
CarolineDenis Sep 30, 2024
b874ccb
Add unit to name
CarolineDenis Sep 30, 2024
82cff39
Remove tecUnitTreeDef from tectUnitTreeDef in types.ts
CarolineDenis Sep 30, 2024
ddbfc43
Revert
CarolineDenis Sep 30, 2024
a290062
get_or_create tectonic unit in migration
acwhite211 Sep 30, 2024
37fd3a5
Add othersideName to tectonicTreeDefItem in datamodel
CarolineDenis Sep 30, 2024
d08609c
Add otherSideName in treeDef
CarolineDenis Sep 30, 2024
de2e08c
lower case model names, no camel case :(
acwhite211 Sep 30, 2024
a5e089d
Add possible missing fields
CarolineDenis Sep 30, 2024
1f52401
Fix taxon typo to tectonic
CarolineDenis Sep 30, 2024
1b85e33
Remove null for parent in tectonicUnit in types.ts
CarolineDenis Sep 30, 2024
2b2b036
Revert "lower case model names, no camel case :("
acwhite211 Sep 30, 2024
cace9c0
Camle case field
CarolineDenis Sep 30, 2024
745271e
Merge branch 'issue-5178-1' of https://github.com/specify/specify7 in…
acwhite211 Sep 30, 2024
b3c2189
Typo
CarolineDenis Sep 30, 2024
27f4ec9
fix typo
acwhite211 Sep 30, 2024
6aa8d21
Merge branch 'issue-5178-1' of https://github.com/specify/specify7 in…
acwhite211 Sep 30, 2024
b2e2702
Chnage rank id
CarolineDenis Sep 30, 2024
b5f131e
add title
acwhite211 Sep 30, 2024
82e9c61
remove create_default_tectonic_ranks for now
acwhite211 Sep 30, 2024
7af87f4
Merge remote-tracking branch 'origin/production' into issue-5178-1
CarolineDenis Oct 1, 2024
a010f41
Update specifyweb/specify/migrations/0005_stratigraphy_age.py
CarolineDenis Oct 2, 2024
3de08db
Add ageNameEnd field
CarolineDenis Oct 2, 2024
c22f0a9
Chnage related name for agenameend
CarolineDenis Oct 2, 2024
3945828
Chnage name related
CarolineDenis Oct 2, 2024
66a7380
Add missing agent 2 to relative age
CarolineDenis Oct 3, 2024
6ab37c3
Chnage ageNameEnd related name
CarolineDenis Oct 3, 2024
7c13695
Fix discipline error
CarolineDenis Oct 3, 2024
0bcf982
Reverse age attachment relationship
CarolineDenis Oct 3, 2024
971fcbd
Improve on attachment age
CarolineDenis Oct 3, 2024
9538b34
Fix missing relative and absolute in names
CarolineDenis Oct 3, 2024
6e14d88
Remove duplicate
CarolineDenis Oct 3, 2024
ce4a548
Merge remote-tracking branch 'origin/production' into issue-5178-1
CarolineDenis Oct 3, 2024
d87a388
Chnage file name
CarolineDenis Oct 3, 2024
0aa0d93
Remove file
CarolineDenis Oct 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions specifyweb/specify/migrations/0005_stratigraphy_age.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,36 @@
('AbsoluteAgeAttachment', None),
]
PICKLIST_NAME = 'AgeType'
DEFAULT_AGE_TYPES = [
CarolineDenis marked this conversation as resolved.
Show resolved Hide resolved
'Sedimentation',
'Metamorphic',
'Inclusion',
'Original',
'Fall'
]

def create_agetype_picklist(apps):
Collection = apps.get_model('specify', 'Collection')
Picklist = apps.get_model('specify', 'Picklist')
PicklistItem = apps.get_model('specify', 'Picklistitem')
# Create a AgeType picklist for each collection
for collection in Collection.objects.all():
Picklist.objects.get_or_create(
age_type_picklist, _ = Picklist.objects.get_or_create(
name=PICKLIST_NAME,
issystem=False,
readonly=False,
sizelimit=-1,
sorttype=1,
type=0,
CarolineDenis marked this conversation as resolved.
Show resolved Hide resolved
tablename='agetype',
collection=collection,
formatter=PICKLIST_NAME
)
for age_type in DEFAULT_AGE_TYPES:
PicklistItem.objects.create(
title=age_type,
value=age_type,
picklist=age_type_picklist
)

def revert_agetype_picklist(apps):
Picklist = apps.get_model('specify', 'Picklist')
Expand Down
Loading