Browse Source

Paramétrage des noms de connexion dans le module Databases

Roland Haroutiounian 9 years ago
parent
commit
966e16a2bb
1 changed files with 12 additions and 12 deletions
  1. 12
    12
      Database/sqlsettings.py

+ 12
- 12
Database/sqlsettings.py View File

5
     DEFAULT_HOSTNAME = 'localhost'
5
     DEFAULT_HOSTNAME = 'localhost'
6
         
6
         
7
     dbms_list = {
7
     dbms_list = {
8
-        'postgresql':{
8
+        'postgresql': {
9
             'driver': 'psycopg2',
9
             'driver': 'psycopg2',
10
             'encoding': 'utf8',
10
             'encoding': 'utf8',
11
         },
11
         },
12
-        'mysql':{
12
+        'mysql': {
13
             # TODO à définir
13
             # TODO à définir
14
-            'driver':'',
15
-            'encoding':'',
14
+            'driver': '',
15
+            'encoding': '',
16
         }
16
         }
17
     }
17
     }
18
 
18
 
19
-    DB_READ_CONNECTION_NAME='' # TODO A configurer
20
-    DB_WRITE_CONNECTION_NAME='' # TODO A configurer
19
+    DB_READ_CONNECTION_NAME = 'default'  # TODO A configurer
20
+    DB_WRITE_CONNECTION_NAME = 'default'  # TODO A configurer
21
     
21
     
22
     querystrings = {
22
     querystrings = {
23
-        'add_column':{
24
-            'default':'ALTER TABLE %s ADD COLUMN %s %s'
23
+        'add_column': {
24
+            'default': 'ALTER TABLE %s ADD COLUMN %s %s'
25
         },
25
         },
26
-        'alter_column':{
27
-            'postgresql':'ALTER TABLE %s ALTER COLUMN %s TYPE %s',
28
-            'mysql':'ALTER TABLE %s ALTER COLUMN %s %s'
26
+        'alter_column': {
27
+            'postgresql': 'ALTER TABLE %s ALTER COLUMN %s TYPE %s',
28
+            'mysql': 'ALTER TABLE %s ALTER COLUMN %s %s'
29
         },
29
         },
30
-        'drop_column':{
30
+        'drop_column': {
31
             'default': 'ALTER TABLE %s DROP COLUMN %s'
31
             'default': 'ALTER TABLE %s DROP COLUMN %s'
32
         }
32
         }
33
     }
33
     }

Loading…
Cancel
Save