Browse Source

Change database name to oscar_travis for migration testing

oscar_vagrant was confusing.
master
David Winterbottom 10 years ago
parent
commit
57ac90fbea

+ 3
- 3
.travis.yml View File

@@ -27,10 +27,10 @@ install:
27 27
 
28 28
 before_script:
29 29
     # Create testing databases for running migrations against
30
-    - mysql -e 'create database oscar_vagrant;'
31
-    - psql -c 'create database oscar_vagrant;' -U postgres
30
+    - mysql -e 'CREATE DATABASE oscar_travis;'
31
+    - psql -c 'CREATE DATABASE oscar_travis;' -U postgres
32 32
     # Create database for building demo site
33
-    - psql -c 'create database oscar_demo;' -U postgres
33
+    - psql -c 'CREATE DATABASE oscar_demo;' -U postgres
34 34
     - psql -c 'CREATE EXTENSION postgis; CREATE EXTENSION postgis_topology;' -U postgres -d oscar_demo
35 35
 
36 36
 script:

+ 2
- 2
sites/sandbox/settings_mysql.py View File

@@ -1,12 +1,12 @@
1 1
 import pymysql
2 2
 pymysql.install_as_MySQLdb()
3 3
 
4
-from settings import *
4
+from settings import *  # noqa
5 5
 
6 6
 DATABASES = {
7 7
     'default': {
8 8
         'ENGINE': 'django.db.backends.mysql',
9
-        'NAME': 'oscar_vagrant',
9
+        'NAME': 'oscar_travis',
10 10
         'USER': 'travis',
11 11
         'PASSWORD': '',
12 12
         'HOST': 'localhost',

+ 2
- 2
sites/sandbox/settings_postgres.py View File

@@ -1,9 +1,9 @@
1
-from settings import *
1
+from settings import *  # noqa
2 2
 
3 3
 DATABASES = {
4 4
     'default': {
5 5
         'ENGINE': 'django.db.backends.postgresql_psycopg2',
6
-        'NAME': 'oscar_vagrant',
6
+        'NAME': 'oscar_travis',
7 7
         'USER': 'travis',
8 8
         'PASSWORD': '',
9 9
         'HOST': '127.0.0.1',

+ 4
- 4
sites/sandbox/test_migrations.sh View File

@@ -11,14 +11,14 @@ if [ ! "$TRAVIS" == "true" ]
11 11
 then
12 12
   # If not on Travis, then create databases
13 13
   echo "Creating MySQL database and user"
14
-  mysql -u root -e "DROP DATABASE IF EXISTS oscar_vagrant; CREATE DATABASE oscar_vagrant"
15
-  mysql -u root -e "GRANT ALL PRIVILEGES ON oscar_vagrant.* TO 'travis'@'localhost' IDENTIFIED BY '';"
14
+  mysql -u root -e "DROP DATABASE IF EXISTS oscar_travis; CREATE DATABASE oscar_travis"
15
+  mysql -u root -e "GRANT ALL PRIVILEGES ON oscar_travis.* TO 'travis'@'localhost' IDENTIFIED BY '';"
16 16
 
17 17
   echo "Creating Postgres database and user"
18 18
   psql -c "DROP ROLE IF EXISTS travis"
19 19
   psql -c "CREATE ROLE travis LOGIN PASSWORD ''"
20
-  psql -c "DROP DATABASE IF EXISTS oscar_vagrant"
21
-  psql -c "CREATE DATABASE oscar_vagrant"
20
+  psql -c "DROP DATABASE IF EXISTS oscar_travis"
21
+  psql -c "CREATE DATABASE oscar_travis"
22 22
 fi
23 23
 
24 24
 # MySQL

Loading…
Cancel
Save