|
@@ -5,29 +5,29 @@ class SQLSettings(object):
|
5
|
5
|
DEFAULT_HOSTNAME = 'localhost'
|
6
|
6
|
|
7
|
7
|
dbms_list = {
|
8
|
|
- 'postgresql':{
|
|
8
|
+ 'postgresql': {
|
9
|
9
|
'driver': 'psycopg2',
|
10
|
10
|
'encoding': 'utf8',
|
11
|
11
|
},
|
12
|
|
- 'mysql':{
|
|
12
|
+ 'mysql': {
|
13
|
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
|
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
|
31
|
'default': 'ALTER TABLE %s DROP COLUMN %s'
|
32
|
32
|
}
|
33
|
33
|
}
|