Comments (5)
The ALTER statements would look something like this:
ALTER TABLE CourierTermsAccepted
DROP FOREIGN KEY CourierTermsAccepted_ibfk_3,
DROP shippingId;
ALTER TABLE Shipping
DROP deliveryAgent_flightCodeTimestamp,
DROP deliveryAgent_label,
DROP readyByTime,
DROP closeTime,
DROP physicalLocation,
DROP deliveryAgent_pickupConfirmationTimestamp,
DROP deliveryAgent_pickupConfirmation,
DROP deliveryAgent_readyByTime,
DROP deliveryAgent_callinTime,
DROP deliveryAgent_productcode,
DROP FOREIGN KEY Shipping_ibfk_4,
DROP deliveryAgent_flightCodePersonId;
ALTER TABLE Dewar
DROP weight,
DROP deliveryAgent_barcode;
ALTER TABLE Laboratory
DROP postcode;
ALTER TABLE CourierTermsAccepted
ADD shippingId int(11) unsigned,
ADD CONSTRAINT CourierTermsAccepted_ibfk_3
FOREIGN KEY (shippingId) REFERENCES Shipping(shippingId) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE Shipping
ADD deliveryAgent_flightCodeTimestamp timestamp NULL DEFAULT NULL COMMENT 'Date flight code created, if automatic',
ADD deliveryAgent_label text COMMENT 'Base64 encoded pdf of airway label',
ADD readyByTime time COMMENT 'Time shipment will be ready',
ADD closeTime time COMMENT 'Time after which shipment cannot be picked up',
ADD physicalLocation varchar(50) COMMENT 'Where shipment can be picked up from: i.e. Stores',
ADD deliveryAgent_pickupConfirmationTimestamp timestamp NULL DEFAULT NULL COMMENT 'Date picked confirmed',
ADD deliveryAgent_pickupConfirmation varchar(10) COMMENT 'Confirmation number of requested pickup',
ADD deliveryAgent_readyByTime time COMMENT 'Confirmed ready-by time',
ADD deliveryAgent_callinTime time COMMENT 'Confirmed courier call-in time',
ADD deliveryAgent_productCode varchar(10) COMMENT 'A code that identifies which shipment service was used',
ADD deliveryAgent_flightCodePersonId int(10) unsigned COMMENT 'The person who created the AWB (for auditing)',
ADD CONSTRAINT Shipping_ibfk_4
FOREIGN KEY (deliveryAgent_flightCodePersonId) REFERENCES Person(personId);
ALTER TABLE Dewar
ADD weight float COMMENT 'Dewar weight in kg',
ADD deliveryAgent_barcode varchar(30) COMMENT 'Courier piece barcode (not the airway bill)';
ALTER TABLE Laboratory
ADD postcode varchar(15);
from ispyb-database-modeling.
I've just edited the above comment and removed the second underscore in two of the proposed columns for the Shipping table. I think that should make it more compliant with the convention we seem to be following.
from ispyb-database-modeling.
Have updated the script again to allow for NULL + make NULL the default value in the proposed Shipping timestamp columns.
from ispyb-database-modeling.
I've again updated the script to add the columns Shipping.deliveryAgent_productcode and Dewar.deliveryAgent_barcode. These are needed to store information needed to produce a report required by DHL, though can be used more generally, of course.
from ispyb-database-modeling.
I've updated the script with an additional column and its foreign key definition: deliveryAgent_flightCodePersonId. As the column comment says, this is to record who actually created the airway bill.
from ispyb-database-modeling.
Related Issues (20)
- Add generic positioner
- Specify subsample type
- Add offsets to BLSampleImage
- Add collectionmode to diffractionplan HOT 1
- Add priority to diffractionplan
- Add a name column to the BLSampleGroup table HOT 2
- Add a userPath column to the DiffractionPlan table HOT 2
- Allow registered dewars to belong to multiple proposals HOT 2
- WIP: New tables and changes for cryo-EM HOT 39
- Add staff comments to BLSample
- Changing the collation from latin1_swedish_ci to utf8mb4_unicode_ci ?
- Add preferredDataCentre to BeamLineSetup
- Add resIOverSigI2 column to AutoProcScalingStatistics
- Add a proposalId column to BLSampleGroup
- Store resolution where I/SigI drops below 2 HOT 1
- Add new column 'uniprotId' to 'Structure' table HOT 1
- Add new RelativeIceThickness table
- Extend ISPyB for cryo-ET and electron diffraction HOT 8
- Add a homeLab cloumn in the Shipping and Crystal tables
- Laboratory name issue at MAXIV
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ispyb-database-modeling.