Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Create init-migrations

  • Loading branch information...
commit 72b6d576ddffea9cf42a14280d9c09ce46bb5a76 1 parent 33ba678
@JeffHeard JeffHeard authored
Showing with 26 additions and 0 deletions.
  1. +26 −0 init-migrations
View
26 init-migrations
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+if [[ $PWD == *hydroshare ]]
+then
+
+docker run -t -i -name hydroshare-migrations \
+ -link hydroshare-redis:redis \
+ -link hydroshare-postgis:postgis \
+ -p 0.0.0.0:80:80 -expose 22 \
+ -v $PWD:/home/docker/hydroshare
+ dev.hydroshare.org:5999/hydroshare /usr/bin/python /home/docker/hydroshare/manage.py schemamigration --init $1
+
+docker rm hydroshare-migrations
+
+docker run -t -i -name hydroshare-migrations \
+ -link hydroshare-redis:redis \
+ -link hydroshare-postgis:postgis \
+ -p 0.0.0.0:80:80 -expose 22 \
+ -v $PWD:/home/docker/hydroshare
+ dev.hydroshare.org:5999/hydroshare /usr/bin/python /home/docker/hydroshare/manage.py migrate
+
+docker rm hydroshare-migrations
+
+else
+ echo "ERROR: Must run migrations from the hydroshare git repository root."
+fi
Please sign in to comment.
Something went wrong with that request. Please try again.