Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
VIPS Backend single server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VIPS setup
VIPS Backend single server
Commits
d3770462
Commit
d3770462
authored
5 years ago
by
Tor-Einar Skog
Browse files
Options
Downloads
Patches
Plain Diff
Saving sketches
parent
63182427
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
db/vipslogic_init_1.sql
+27
-0
27 additions, 0 deletions
db/vipslogic_init_1.sql
db/vipslogic_init_2.sql
+54
-0
54 additions, 0 deletions
db/vipslogic_init_2.sql
with
81 additions
and
0 deletions
db/vipslogic_init_1.sql
0 → 100644
+
27
−
0
View file @
d3770462
-- This script must be run as superuser (postgres)
-- Before you deploy VIPSLogic
SET
statement_timeout
=
0
;
SET
lock_timeout
=
0
;
SET
client_encoding
=
'UTF8'
;
SET
standard_conforming_strings
=
on
;
SET
check_function_bodies
=
false
;
SET
client_min_messages
=
warning
;
SET
row_security
=
off
;
CREATE
USER
vipslogic
WITH
PASSWORD
:
vipslogic_password
;
CREATE
DATABASE
vipslogic
WITH
OWNER
=
vipslogic
ENCODING
=
'UTF8'
TABLESPACE
=
pg_default
LC_COLLATE
=
'en_US.UTF-8'
LC_CTYPE
=
'en_US.UTF-8'
CONNECTION
LIMIT
=
-
1
;
-- WE NEED TO DO THIS IN ORDER TO MAKE flywaydb RUN THE INITIAL MIGRATION
-- MAKE SURE YOU REVOKE THIS PRIVILEGE AFTER FIRST DEPLOYMENT OF VIPSLOGIC
-- (Like this: ALTER ROLE vipslogic NOSUPERUSER;)
ALTER
ROLE
vipslogic
SUPERUSER
;
This diff is collapsed.
Click to expand it.
db/vipslogic_init_2.sql
0 → 100644
+
54
−
0
View file @
d3770462
-- This script should be run as superuser (postgres) AFTER the first successful deployment of VIPSLogic
-- DON'T FORGET TO EDIT WITH YOUR OWN INFO
-- psql -f init_org_and_user.sql vipslogic
-- In case you forgot until now...
ALTER
ROLE
vipslogic
NOSUPERUSER
;
-- SETUP organization AND first admin user
INSERT
INTO
organization
(
organization_id
,
organization_name
,
parent_organization_id
,
address1
,
address2
,
postal_code
,
country_code
,
default_locale
,
default_map_center
,
default_map_zoom
,
default_time_zone
,
city
,
default_vips_core_user_id
,
vipsweb_url
)
VALUES
(
1
,
-- organization_id
'VIPS Norge'
,
-- organization_name
NULL
,
-- parent_organization_id (normally not in use, consider deprecated)
'Postboks 115'
,
-- address1
NULL
,
-- address2
'1431'
,
-- postal_code (ZIP)
'NO'
,
-- country_code Ref. table public.country
'nb'
,
-- default_locale Ref. https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html
ST_GeomFromText
(
'POINT(10.00015 68.432044)'
,
4326
),
-- default_map_center
4
,
-- default_map_zoom (OpenLayers zoom level)
'Europe/Oslo'
,
-- default_time_zone Ref. https://docs.oracle.com/javase/8/docs/api/java/util/TimeZone.html
'Ås'
,
-- city
1
,
-- default_vips_core_user_id
'http://www.vips-landbruk.no/'
-- vipsweb_url URL to the public website
);
INSERT
INTO
vips_logic_user
(
user_id
,
email
,
first_name
,
last_name
,
organization_id
,
remarks
,
user_status_id
,
vips_core_user_id
,
preferred_locale
,
phone
,
approves_sms_billing
,
phone_country_code
,
free_sms
)
VALUES
(
1
,
-- user_id
'foo.bar@foobar.com'
,
-- user_email
'Foo'
,
-- first_name
'Bar'
,
-- last_name
1
,
-- organization_id
'Created at application initialization'
,
-- General remarks about user
4
,
-- user_status_id 4 = approved
1
,
-- vips_core_user_id = Which user id you have in the VIPSCoreManager auth system
'en'
,
-- preferred_locale Ref. https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html
'21324354'
,
-- phone (without country code)
true
,
-- approves_sms_billing If true = Approves to the SMS service provider that billing is OK
'47'
,
-- phone_country_code
true
-- free_sms If true = receive free SMSs from the SMS service provider
);
INSERT
INTO
user_vips_logic_role
(
vips_logic_role_id
,
user_id
)
VALUES
(
1
,
1
);
-- super user
INSERT
INTO
user_authentication
(
user_id
,
user_authentication_type_id
,
username
,
password
)
VALUES
(
1
,
-- user_id
1
,
-- authentication_type_id Ref public.user_authentication_type (Password in this example)
'foobar'
,
-- username
'XXXXXXXXXXXXXXXX'
-- password, MD5 encrypted with the no.nibio.vips.logic.MD5_SALT (see the appserver configuration settings)
);
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment