Explorar el Código

Removing hardcoded database name

Penta hace 5 años
padre
commit
20e4f06dbf
Se han modificado 2 ficheros con 1 adiciones y 5 borrados
  1. 1 1
      .travis.yml
  2. 0 4
      extra/myanimebot-init.sql

+ 1 - 1
.travis.yml

@@ -21,7 +21,7 @@ install:
   - pip install -U pytest-cov
 script:
   # Import of the database architecture
-  - sudo mariadb < extra/myanimebot-init.sql
+  - sudo mariadb $DB_NAME < extra/myanimebot-init.sql
   # Creation of the user for the application
   - sudo mariadb -e "CREATE USER IF NOT EXISTS '$DB_USER'@'$DB_HOST' IDENTIFIED BY '$DB_PASSWORD'; GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DB_USER'@'$DB_HOST'; FLUSH PRIVILEGES;"
   - mkdir "logs"

+ 0 - 4
extra/myanimebot-init.sql

@@ -11,10 +11,6 @@
 /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
 
 
--- Dumping database structure for myanimebot
-CREATE DATABASE IF NOT EXISTS `myanimebot` /*!40100 DEFAULT CHARACTER SET utf8 */;
-USE `myanimebot`;
-
 -- Dumping structure for view myanimebot.check_DuplicateFeeds
 -- Creating temporary table to overcome VIEW dependency errors
 CREATE TABLE `check_DuplicateFeeds` (