|
1 | | -#$Id: back_mysql.py,v 1.73 2007-09-28 15:26:10 jpend Exp $ |
| 1 | +#$Id: back_mysql.py,v 1.74 2007-10-26 01:34:43 richard Exp $ |
2 | 2 | # |
3 | 3 | # Copyright (c) 2003 Martynas Sklyzmantas, Andrey Lebedev <[email protected]> |
4 | 4 | # |
|
13 | 13 | How to implement AUTO_INCREMENT: |
14 | 14 |
|
15 | 15 | mysql> create table foo (num integer auto_increment primary key, name |
16 | | -varchar(255)) AUTO_INCREMENT=1 type=InnoDB; |
| 16 | +varchar(255)) AUTO_INCREMENT=1 ENGINE=InnoDB; |
17 | 17 |
|
18 | 18 | ql> insert into foo (name) values ('foo5'); |
19 | 19 | Query OK, 1 row affected (0.00 sec) |
@@ -392,7 +392,7 @@ def create_class_table(self, spec, create_sequence=1): |
392 | 392 |
|
393 | 393 | # create the base table |
394 | 394 | scols = ','.join(['%s %s'%x for x in cols]) |
395 | | - sql = 'create table _%s (%s) type=%s'%(spec.classname, scols, |
| 395 | + sql = 'create table _%s (%s) ENGINE=%s'%(spec.classname, scols, |
396 | 396 | self.mysql_backend) |
397 | 397 | self.sql(sql) |
398 | 398 |
|
@@ -453,7 +453,7 @@ def create_journal_table(self, spec): |
453 | 453 | for x in 'nodeid date tag action params'.split()]) |
454 | 454 | sql = '''create table %s__journal ( |
455 | 455 | nodeid integer, date datetime, tag varchar(255), |
456 | | - action varchar(255), params text) type=%s'''%( |
| 456 | + action varchar(255), params text) ENGINE=%s'''%( |
457 | 457 | spec.classname, self.mysql_backend) |
458 | 458 | self.sql(sql) |
459 | 459 | self.create_journal_table_indexes(spec) |
|
0 commit comments