From 5c0518c1ff7262a39dd1928e6d35702917d626af Mon Sep 17 00:00:00 2001 From: Guilherme de Freitas Date: Fri, 10 Apr 2026 10:45:44 +0100 Subject: [PATCH 1/2] Add elements to Component, ComponentType --- .../updates/2026_04_10_Component_element.sql | 124 ++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 schemas/ispyb/updates/2026_04_10_Component_element.sql diff --git a/schemas/ispyb/updates/2026_04_10_Component_element.sql b/schemas/ispyb/updates/2026_04_10_Component_element.sql new file mode 100644 index 0000000..6021a5e --- /dev/null +++ b/schemas/ispyb/updates/2026_04_10_Component_element.sql @@ -0,0 +1,124 @@ +INSERT IGNORE INTO SchemaStatus (scriptName, schemaStatus) VALUES ('2026_04_10_Component_element.sql', 'ONGOING'); + +INSERT INTO ispyb.ComponentType (name) VALUES ('Element'); +INSERT INTO ispyb.Component (componentTypeId, name, composition) VALUES + ('8', 'H', 'Hydrogen'), + ('8', 'He', 'Helium'), + ('8', 'Li', 'Lithium'), + ('8', 'Be', 'Beryllium'), + ('8', 'B', 'Boron'), + ('8', 'C', 'Carbon'), + ('8', 'N', 'Nitrogen'), + ('8', 'O', 'Oxygen'), + ('8', 'F', 'Fluorine'), + ('8', 'Ne', 'Neon'), + ('8', 'Na', 'Sodium'), + ('8', 'Mg', 'Magnesium'), + ('8', 'Al', 'Aluminum'), + ('8', 'Si', 'Silicon'), + ('8', 'P', 'Phosphorus'), + ('8', 'S', 'Sulfur'), + ('8', 'Cl', 'Chlorine'), + ('8', 'Ar', 'Argon'), + ('8', 'K', 'Potassium'), + ('8', 'Ca', 'Calcium'), + ('8', 'Sc', 'Scandium'), + ('8', 'Ti', 'Titanium'), + ('8', 'V', 'Vanadium'), + ('8', 'Cr', 'Chromium'), + ('8', 'Mn', 'Manganese'), + ('8', 'Fe', 'Iron'), + ('8', 'Co', 'Cobalt'), + ('8', 'Ni', 'Nickel'), + ('8', 'Cu', 'Copper'), + ('8', 'Zn', 'Zinc'), + ('8', 'Ga', 'Gallium'), + ('8', 'Ge', 'Germanium'), + ('8', 'As', 'Arsenic'), + ('8', 'Se', 'Selenium'), + ('8', 'Br', 'Bromine'), + ('8', 'Kr', 'Krypton'), + ('8', 'Rb', 'Rubidium'), + ('8', 'Sr', 'Strontium'), + ('8', 'Y', 'Yttrium'), + ('8', 'Zr', 'Zirconium'), + ('8', 'Nb', 'Niobium'), + ('8', 'Mo', 'Molybdenum'), + ('8', 'Tc', 'Technetium'), + ('8', 'Ru', 'Ruthenium'), + ('8', 'Rh', 'Rhodium'), + ('8', 'Pd', 'Palladium'), + ('8', 'Ag', 'Silver'), + ('8', 'Cd', 'Cadmium'), + ('8', 'In', 'Indium'), + ('8', 'Sn', 'Tin'), + ('8', 'Sb', 'Antimony'), + ('8', 'Te', 'Tellurium'), + ('8', 'I', 'Iodine'), + ('8', 'Xe', 'Xenon'), + ('8', 'Cs', 'Cesium'), + ('8', 'Ba', 'Barium'), + ('8', 'La', 'Lanthanum'), + ('8', 'Ce', 'Cerium'), + ('8', 'Pr', 'Praseodymium'), + ('8', 'Nd', 'Neodymium'), + ('8', 'Pm', 'Promethium'), + ('8', 'Sm', 'Samarium'), + ('8', 'Eu', 'Europium'), + ('8', 'Gd', 'Gadolinium'), + ('8', 'Tb', 'Terbium'), + ('8', 'Dy', 'Dysprosium'), + ('8', 'Ho', 'Holmium'), + ('8', 'Er', 'Erbium'), + ('8', 'Tm', 'Thulium'), + ('8', 'Yb', 'Ytterbium'), + ('8', 'Lu', 'Lutetium'), + ('8', 'Hf', 'Hafnium'), + ('8', 'Ta', 'Tantalum'), + ('8', 'W', 'Tungsten'), + ('8', 'Re', 'Rhenium'), + ('8', 'Os', 'Osmium'), + ('8', 'Ir', 'Iridium'), + ('8', 'Pt', 'Platinum'), + ('8', 'Au', 'Gold'), + ('8', 'Hg', 'Mercury'), + ('8', 'Tl', 'Thallium'), + ('8', 'Pb', 'Lead'), + ('8', 'Bi', 'Bismuth'), + ('8', 'Po', 'Polonium'), + ('8', 'At', 'Astatine'), + ('8', 'Rn', 'Radon'), + ('8', 'Fr', 'Francium'), + ('8', 'Ra', 'Radium'), + ('8', 'Ac', 'Actinium'), + ('8', 'Th', 'Thorium'), + ('8', 'Pa', 'Protactinium'), + ('8', 'U', 'Uranium'), + ('8', 'Np', 'Neptunium'), + ('8', 'Pu', 'Plutonium'), + ('8', 'Am', 'Americium'), + ('8', 'Cm', 'Curium'), + ('8', 'Bk', 'Berkelium'), + ('8', 'Cf', 'Californium'), + ('8', 'Es', 'Einsteinium'), + ('8', 'Fm', 'Fermium'), + ('8', 'Md', 'Mendelevium'), + ('8', 'No', 'Nobelium'), + ('8', 'Lr', 'Lawrencium'), + ('8', 'Rf', 'Rutherfordium'), + ('8', 'Db', 'Dubnium'), + ('8', 'Sg', 'Seaborgium'), + ('8', 'Bh', 'Bohrium'), + ('8', 'Hs', 'Hassium'), + ('8', 'Mt', 'Meitnerium'), + ('8', 'Ds', 'Darmstadtium'), + ('8', 'Rg', 'Roentgenium'), + ('8', 'Cn', 'Copernicium'), + ('8', 'Nh', 'Nihonium'), + ('8', 'Fl', 'Flerovium'), + ('8', 'Mc', 'Moscovium'), + ('8', 'Lv', 'Livermorium'), + ('8', 'Ts', 'Tennessine'), + ('8', 'Og', 'Oganesson'); + +UPDATE SchemaStatus SET schemaStatus = 'DONE' WHERE scriptName = '2026_04_10_Component_element.sql'; From 1dd6acb6e1eb8983058a6d1e05f0761e6c5513a7 Mon Sep 17 00:00:00 2001 From: Guilherme de Freitas Date: Fri, 10 Apr 2026 10:52:38 +0100 Subject: [PATCH 2/2] Remove database prefix --- schemas/ispyb/updates/2026_04_10_Component_element.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/schemas/ispyb/updates/2026_04_10_Component_element.sql b/schemas/ispyb/updates/2026_04_10_Component_element.sql index 6021a5e..3dd5c25 100644 --- a/schemas/ispyb/updates/2026_04_10_Component_element.sql +++ b/schemas/ispyb/updates/2026_04_10_Component_element.sql @@ -1,7 +1,7 @@ INSERT IGNORE INTO SchemaStatus (scriptName, schemaStatus) VALUES ('2026_04_10_Component_element.sql', 'ONGOING'); -INSERT INTO ispyb.ComponentType (name) VALUES ('Element'); -INSERT INTO ispyb.Component (componentTypeId, name, composition) VALUES +INSERT INTO ComponentType (name) VALUES ('Element'); +INSERT INTO Component (componentTypeId, name, composition) VALUES ('8', 'H', 'Hydrogen'), ('8', 'He', 'Helium'), ('8', 'Li', 'Lithium'),