Browse Source

[#63] Change in the new of the foreign key generator

Roland Haroutiounian 9 years ago
parent
commit
6f06c86a86
2 changed files with 4 additions and 1 deletions
  1. 3
    1
      DataSource/MySQL/MySQL.py
  2. 1
    0
      leobject/datasources/ledatasourcesql.py

+ 3
- 1
DataSource/MySQL/MySQL.py View File

@@ -2,6 +2,8 @@
2 2
 
3 3
 
4 4
 import EditorialModel
5
+import pymysql
6
+
5 7
 
6 8
 ## @brief Manages the accesses to a MySQL datasource
7 9
 class MySQL(object):
@@ -42,7 +44,7 @@ class MySQL(object):
42 44
     # @param src_table_name str
43 45
     # @param dst_table_name str
44 46
     # @return str
45
-    def _fk_name(cls, src_table_name, dst_table_name):
47
+    def get_fk_name(cls, src_table_name, dst_table_name):
46 48
         return "fk_%s_%s" % (src_table_name, dst_table_name)
47 49
 
48 50
     @classmethod

+ 1
- 0
leobject/datasources/ledatasourcesql.py View File

@@ -9,6 +9,7 @@ from mosql.db import Database, all_to_dicts
9 9
 from mosql.query import select, insert, update, delete, join
10 10
 from mosql.util import raw
11 11
 import mosql.mysql
12
+from DataSource.MySQL.MySQL import MySQL
12 13
 
13 14
 ## MySQL DataSource for LeObject
14 15
 class LeDataSourceSQL(DummyDatasource):

Loading…
Cancel
Save