Skip to content
Snippets Groups Projects
Commit 411e34f7 authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Docs: Added database init example

parent 3e220cb9
Branches
Tags
No related merge requests found
......@@ -108,5 +108,22 @@ no.nibio.vips.coremanager.MD5_SALT=FooBarFooBarFooBar
### Initialization
The code includes database migrations by Flyway, so the database structure will be created automatically on the first successfull deployment.
In order to use the service, you need to add at least one organization and at least one user. This is done by SQL directly in the database.
In order to use the service, you need to add at least one organization and at least one user. This is done by SQL directly in the database. See example below:
```sql
-- Create the organization
INSERT INTO public.organization(organization_name)VALUES('Foobar International');
-- Create the batch user for VIPSLogic
-- Assuming that the INSERT statement above created an organization with organization_id=1
INSERT INTO public.vips_core_user(vips_core_user_id,last_name,organization_id)
VALUES(-10,'VIPSLogic',1);
-- Create login credentials for this user
-- Use the system property no.nibio.vips.coremanager.MD5_SALT to create the hash
-- These credentials must be set as system properties in the server running VIPSLogic
-- (Please the the docs for VIPSLogic)
INSERT INTO public.vips_core_credentials(username,password,vips_core_user_id)
VALUES('vipslogic','XXXXXXXXXXX',-10);
```
## Create a client
If you don't use VIPSLogic or just want to test the system (e.g. with Postman), you can send requests directly to the system. Please see the VIPSCore documentation for how to do this.
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment