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
Show file tree
Hide file tree
Changes from 49 commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
exports[`fields are loaded 1`] = `
[
"[literalField CollectionObject.actualTotalCountAmt]",
"[literalField CollectionObject.age]",
"[literalField CollectionObject.availability]",
"[literalField CollectionObject.catalogNumber]",
"[literalField CollectionObject.catalogedDate]",
Expand Down Expand Up @@ -104,6 +105,7 @@ exports[`fields are loaded 1`] = `
exports[`literal fields are loaded 1`] = `
[
"[literalField CollectionObject.actualTotalCountAmt]",
"[literalField CollectionObject.age]",
"[literalField CollectionObject.availability]",
"[literalField CollectionObject.catalogNumber]",
"[literalField CollectionObject.catalogedDate]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ test('indexed fields are loaded', () =>
{
"accession": "[relationship CollectionObject.accession]",
"actualTotalCountAmt": "[literalField CollectionObject.actualTotalCountAmt]",
"age": "[literalField CollectionObject.age]",
"agent1": "[relationship CollectionObject.agent1]",
"altCatalogNumber": "[literalField CollectionObject.altCatalogNumber]",
"appraisal": "[relationship CollectionObject.appraisal]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ export const schemaExtras: {
indexed: false,
unique: false,
}),
new LiteralField(table, { // TODO: LiteralField or Relationship?
name: 'age',
required: false,
readOnly: true,
type: 'java.lang.Integer',
indexed: false,
unique: false,
}),
],
(): void => {
const collection = getField(table, 'collection');
Expand Down
231 changes: 231 additions & 0 deletions specifyweb/frontend/js_src/lib/components/DataModel/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6556,3 +6556,234 @@ export type CollectionObjectGroupType = {
readonly toManyDependent: RR<never, never>;
readonly toManyIndependent: RR<never, never>;
};
export type AbsoluteAge = {
readonly tableName: 'AbsoluteAge';
readonly fields: {
readonly absoluteage: number | null;
readonly agetype: string | null;
readonly ageuncertainty: number | null;
readonly collectiondate: string | null;
readonly date1: string | null;
readonly date2: string | null;
readonly datingmethod: string | null;
readonly datingmethodremarks: string | null;
readonly number1: number | null;
readonly number2: number | null;
readonly remarks: string | null;
readonly text1: string | null;
readonly text2: string | null;
readonly yesno1: boolean | null;
readonly yesno2: boolean | null;
readonly timestampcreated: string;
readonly timestampmodified: string | null;
CarolineDenis marked this conversation as resolved.
Show resolved Hide resolved
};
readonly toOneDependent: RR<never, never>;
readonly toOneIndependent: {
readonly ageattachment: AbsoluteAgeAttachment | null;
readonly agent1: Agent | null;
readonly collectionobject: CollectionObject;
readonly createdByAgent: Agent | null;
readonly modifiedByAgent: Agent | null;
};
readonly toManyDependent: RR<never, never>;
readonly toManyIndependent: RR<never, never>;
};
export type RelativeAge = {
readonly tableName: 'RelativeAge';
readonly fields: {
readonly agetype: string | null;
readonly ageuncertainty: number | null;
readonly collectiondate: string | null;
readonly date1: string | null;
readonly date2: string | null;
readonly datingmethod: string | null;
readonly datingmethodremarks: string | null;
readonly relativeageperiod: number | null;
readonly number1: number | null;
readonly number2: number | null;
readonly remarks: string | null;
readonly text1: string | null;
readonly text2: string | null;
readonly yesno1: boolean | null;
readonly yesno2: boolean | null;
readonly timestampcreated: string;
readonly timestampmodified: string | null;
readonly verbatimname: string | null;
readonly verbatimperiod: string | null;
};
readonly toOneDependent: RR<never, never>;
readonly toOneIndependent: {
readonly ageattachment: RelativeAgeAttachment | null;
readonly agename: GeologicTimePeriod | null;
readonly agent1: Agent | null;
readonly collectionobject: CollectionObject;
readonly createdByAgent: Agent | null;
readonly modifiedByAgent: Agent | null;
};
readonly toManyDependent: RR<never, never>;
readonly toManyIndependent: RR<never, never>;
};
export type AbsoluteAgeAttachment = {
readonly tableName: 'AbsoluteAgeAttachment';
readonly fields: {
readonly ordinal: number | null;
readonly remarks: string | null;
readonly timestampcreated: string;
readonly timestampmodified: string | null;
readonly version: number | null;
};
readonly toOneDependent: RR<never, never>;
readonly toOneIndependent: {
readonly absoluteage: AbsoluteAge;
readonly attachment: Attachment;
readonly collectionmember: Collection;
readonly createdbyagent: Agent | null;
readonly modifiedbyagent: Agent | null;
};
readonly toManyDependent: RR<never, never>;
readonly toManyIndependent: RR<never, never>;
};
export type RelativeAgeAttachment = {
readonly tableName: 'RelativeAgeAttachment';
readonly fields: {
readonly ordinal: number | null;
readonly remarks: string | null;
readonly timestampcreated: string;
readonly timestampmodified: string | null;
readonly version: number | null;
};
readonly toOneDependent: RR<never, never>;
readonly toOneIndependent: {
readonly attachment: Attachment;
readonly collectionmember: Collection;
readonly createdbyagent: Agent | null;
readonly modifiedbyagent: Agent | null;
readonly relativeage: RelativeAge;
};
readonly toManyDependent: RR<never, never>;
readonly toManyIndependent: RR<never, never>;
};
export type AbsoluteAgeCitation = {
readonly tableName: 'AbsoluteAgeCitation';
readonly fields: {
readonly figurenumber: string | null;
readonly isfigured: boolean | null;
readonly pagenumber: string | null;
readonly platenumber: string | null;
readonly remarks: string | null;
readonly timestampcreated: string;
readonly timestampmodified: string | null;
readonly version: number | null;
};
readonly toOneDependent: RR<never, never>;
readonly toOneIndependent: {
readonly absoluteage: AbsoluteAge;
readonly collectionmember: Collection;
readonly createdbyagent: Agent | null;
readonly modifiedbyagent: Agent | null;
readonly referencework: ReferenceWork;
};
readonly toManyDependent: RR<never, never>;
readonly toManyIndependent: RR<never, never>;
};
export type RelativeAgeCitation = {
readonly tableName: 'RelativeAgeCitation';
readonly fields: {
readonly figurenumber: string | null;
readonly isfigured: boolean | null;
readonly pagenumber: string | null;
readonly platenumber: string | null;
readonly remarks: string | null;
readonly timestampcreated: string;
readonly timestampmodified: string | null;
readonly version: number | null;
};
readonly toOneDependent: RR<never, never>;
readonly toOneIndependent: {
readonly collectionmember: Collection;
readonly createdbyagent: Agent | null;
readonly modifiedbyagent: Agent | null;
readonly referencework: ReferenceWork;
readonly relativeage: RelativeAge;
};
readonly toManyDependent: RR<never, never>;
readonly toManyIndependent: RR<never, never>;
};
export type TectonicTreeDef = {
readonly tableName: 'TectonicTreeDef';
readonly fields: {
readonly fullnamedirection: number | null;
readonly name: string;
readonly remarks: string | null;
readonly timestampcreated: string;
readonly timestampmodified: string | null;
readonly version: number | null;
};
readonly toOneDependent: RR<never, never>;
readonly toOneIndependent: {
readonly createdbyagent: Agent | null;
readonly modifiedbyagent: Agent | null;
readonly discipline: Discipline;
};
readonly toManyDependent: RR<never, never>;
readonly toManyIndependent: RR<never, never>;
};
export type TectonicTreeDefItem = {
readonly tableName: 'TectonicTreeDefItem';
readonly fields: {
readonly fullnameseparator: string | null;
readonly isenforced: boolean | null;
readonly isinfullname: boolean | null;
readonly name: string;
readonly rankid: number | null;
readonly remarks: string | null;
readonly textafter: string | null;
readonly textbefore: string | null;
readonly timestampcreated: string;
readonly timestampmodified: string | null;
readonly title: string | null;
readonly version: number | null;
};
readonly toOneDependent: RR<never, never>;
readonly toOneIndependent: {
readonly createdbyagent: Agent | null;
readonly modifiedbyagent: Agent | null;
readonly parentitem: TectonicTreeDefItem | null;
readonly tectonictreedef: TectonicTreeDef;
};
readonly toManyDependent: RR<never, never>;
readonly toManyIndependent: RR<never, never>;
};
export type TectonicUnit = {
readonly tableName: 'TectonicUnit';
readonly fields: {
readonly fullname: string | null;
readonly guid: string | null;
readonly highestchildnodenumber: number | null;
readonly isaccepted: boolean;
readonly name: string;
readonly nodenumber: number | null;
readonly number1: number | null;
readonly number2: number | null;
readonly rankid: number;
readonly remarks: string | null;
readonly text1: string | null;
readonly text2: string | null;
readonly timestampcreated: string;
readonly timestampmodified: string | null;
readonly version: number | null;
readonly yesno1: boolean | null;
readonly yesno2: boolean | null;
};
readonly toOneDependent: RR<never, never>;
readonly toOneIndependent: {
readonly acceptedTectonicUnit: TectonicUnit | null;
readonly createdbyagent: Agent | null;
readonly modifiedbyagent: Agent | null;
readonly parent: TectonicUnit | null;
readonly tectonictreedef: TectonicTreeDef;
readonly tectonictreedefitem: TectonicTreeDefItem;
};
readonly toManyDependent: RR<never, never>;
readonly toManyIndependent: RR<never, never>;
};
Loading
Loading