-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Karl Levik
committed
Apr 6, 2019
1 parent
be53105
commit 48f140b
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
[![Build Status](https://travis-ci.org/DiamondLightSource/ispyb-database.svg?branch=master)](https://travis-ci.org/DiamondLightSource/ispyb-database) | ||
|
||
# ispyb-database | ||
|
||
This package provides all the scripts necessary to create an up-to-date ISPyB | ||
database. | ||
|
||
## Requirements | ||
|
||
* MariaDB 10.0+ or MySQL 5.6+, but we recommend MariaDB 10.2 or later. | ||
* If binary logging is enabled in the DB system, then execute this before importing the test schema: set global log_bin_trust_function_creators=ON; | ||
|
||
## Installation | ||
|
||
Run this on the command-line to create a database and import the schema stored in the SQL files: | ||
|
||
```bash | ||
mysql -e "CREATE DATABASE ispyb" | ||
mysql ispyb < schema/tables.sql | ||
mysql ispyb < schema/lookups.sql | ||
mysql ispyb < schema/data.sql | ||
mysql ispyb < schema/routines.sql | ||
``` | ||
|
||
Note that the `data.sql` file contains test data, so is only useful in a development environment. | ||
|
||
Alternatively, in a test environment you can also run the build.sh file. This creates the database, runs the above .sql files and more. | ||
|
||
## Documentation | ||
|
||
* Please refer to the [```Wiki```](https://github.com/DiamondLightSource/ispyb-database/wiki) for database diagrams, stored procedure how-to, MariaDB installation and more | ||
* A complete [```list of tables and columns```](https://github.com/DiamondLightSource/ispyb-database/blob/master/docs/list_of_tables_and_columns.rst) for more details about the tables and columns | ||
* A complete [```list of stored procedures```](https://github.com/DiamondLightSource/ispyb-database/blob/master/docs/list_of_procs.rst) for more details about the stored procedures |