Fix default values for WRD_ID referenced fields

Description

Created and an empty DB and them used step_04_all_following_steps.sql. Then dumped the DDL to a file which will be called Step 4. Started clean again and used load_demo_data.sql. Then dumped the DDL to a file which will be called Demo. Next a diff of the two files was done. There are many key, foreign key, and constraint issues highlighted in the diff. This issue will only enumerate field and engine differences.

Below find for each named table what is found in Step 4 and the corresponding difference from Demo:

oh_medicaldsrstovkmov
STEP 4: MMV_WRD_ID_A char(3) DEFAULT '',
Demo: MMV_WRD_ID_A char(3) DEFAULT NULL,

oh_medicaldsrstockmovward
STEP 4: MMVN_WRD_ID_A char(3) NOT NULL DEFAULT '',
Demo: MMVN_WRD_ID_A char(3) NOT NULL,

oh_medicaldsrward
STEP 4: MDSRWRD_WRD_ID_A char(3) NOT NULL DEFAULT '',
Demo: MDSRWRD_WRD_ID_A char(3) NOT NULL,

oh_operationrow
STEP 4: OPER_ADMISSION_ID int(11) DEFAULT NULL,
OPER_OPD_ID int(11) DEFAULT NULL,
OPER_BILL_ID int(11) DEFAULT NULL,
Demo: OPER_ADMISSION_ID int(11) DEFAULT 0,
OPER_OPD_ID int(11) DEFAULT 0,
OPER_BILL_ID int(11) DEFAULT 0,

oh_visits
STEP 4: VST_WRD_ID_A char(3) DEFAULT '',
Demo: VST_WRD_ID_A char(3) DEFAULT NULL,

oh_ward
STEP 4: WRD_ID_A char(3) NOT NULL DEFAULT '',
Demo: WRD_ID_A char(3) NOT NULL,

Environment

None

Activity

Alessandro Domanico June 15, 2023 at 1:04 PM
Edited

From the review on these should be the changes to be addressed with a new step_XX:

 

Other diffs should be already fixed.

David B Malkovsky June 14, 2023 at 9:59 PM

Yes I ran step_01_create_structure.sql; just forgot to mention it.

Alessandro Domanico June 14, 2023 at 9:51 PM

but it run also step_01_create_structure.sql….

Anyway there should be also some differencies due to (forgot demo data… )

and will do also after

I think this issue can wait for the latter to be completed.

David B Malkovsky June 14, 2023 at 9:41 PM

Because create_all_ tries to read from csv files and I wasn’t interested in that.

Alessandro Domanico June 14, 2023 at 9:19 PM

definetely we can fix load_demo_data.sql

anyway why using only step_04_all_following_steps.sql and not a create_all_*.sql?

Done

Details

Assignee

Reporter

Labels

Original estimate

Time tracking

15m logged1h 45m remaining

Components

Fix versions

Affects versions

Priority

Created June 14, 2023 at 7:57 PM
Updated October 13, 2023 at 8:10 PM
Resolved June 15, 2023 at 8:44 PM