Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dm-docs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hammonds
dm-docs
Commits
e2d293d0
Commit
e2d293d0
authored
10 years ago
by
sveseli
Browse files
Options
Downloads
Patches
Plain Diff
population scripts for users and experiment types
parent
e67d342a
No related branches found
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sbin/create_dm_db.sh
+11
-9
11 additions, 9 deletions
sbin/create_dm_db.sh
with
11 additions
and
9 deletions
sbin/create_dm_db.sh
+
11
−
9
View file @
e2d293d0
...
...
@@ -176,16 +176,18 @@ createDb || exit 1
# populate db
cd
$CURRENT_DIR
&&
cd
$DM_DB_SCRIPTS_DIR
DM_DB_TABLES
=
"
\
experiment_type
\
user_info
\
"
#
for dbTable in $DM_DB_TABLES; do
#
dbFile=populate_$dbTable.sql
#
if [ -f $dbFile ]; then
#
echo "Populating $dbTable using $dbFile script"
#
execute $
mysqlCmd $dbFile
#
else
#
echo "$dbFile not found, skipping $dbTable update"
#
fi
#
done
for
dbTable
in
$DM_DB_TABLES
;
do
dbFile
=
populate_
$dbTable
.sql
if
[
-f
$dbFile
]
;
then
echo
"Populating
$dbTable
using
$dbFile
script"
execute
$
{
PG_DIR
}
/bin/psql
-U
$DM_DB_USER
-h
$DM_DB_HOST
-p
$DM_DB_PORT
-d
$DM_DB_NAME
-f
$dbFile
||
exit
1
else
echo
"
$dbFile
not found, skipping
$dbTable
update"
fi
done
# cleanup
echo
"Restoring db access permissions"
...
...
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