-CREATE TABLE IntermediateSubstance (
- id INTEGER PRIMARY KEY,
- name TEXT NOT NULL,
- quantity_id INTEGER,
- output_step_id INTEGER NOT NULL,
- input_step_id INTEGER NOT NULL,
-
- FOREIGN KEY(quantity_id) REFERENCES Quantity(id),
- FOREIGN KEY(output_step_id) REFERENCES Step(id),
- FOREIGN KEY(input_step_id) REFERENCES Step(id)
-);
\ No newline at end of file
+CREATE INDEX [Step_order_index] ON [Group] ([order]);
+
+CREATE TABLE [IntermediateSubstance] (
+ [id] INTEGER PRIMARY KEY,
+ [name] TEXT NOT NULL,
+ [quantity_id] INTEGER,
+ [output_step_id] INTEGER NOT NULL,
+ [input_step_id] INTEGER NOT NULL,
+
+ FOREIGN KEY([quantity_id]) REFERENCES [Quantity]([id]),
+ FOREIGN KEY([output_step_id]) REFERENCES [Step]([id]),
+ FOREIGN KEY([input_step_id]) REFERENCES [Step]([id])
+);