so using the argument db=DAL(' mysql://...... ' , check_reserved=['all']),
it restricts the use of the mysql keywords. But the problem is the database
which already available in mysql contains table name such "block", other
that the "condition" field. So it impossible for me to change the database
structure.
One more thing I tried running sql query in mysql prompt but it doesnt give
errors.
mysql> CREATE TABLE IF NOT EXISTS `rms_rule` (
-> `rule_id` smallint(8) unsigned NOT NULL,
-> `created_on` datetime NOT NULL,
-> `modified_on` datetime NOT NULL,
-> `created_by` int(11) NOT NULL,
-> `category_id` int(11) NOT NULL,
-> `is_active` tinyint(4) unsigned NOT NULL,
-> `action` enum('None','Review','Approve','Reject') NOT NULL,
-> `score` smallint(6) NOT NULL DEFAULT '0',
-> `field_id` smallint(5) unsigned NOT NULL,
-> `params_type` tinyint(3) unsigned NOT NULL,
-> `condition`
enum('IsEqual','IsNotEqual','IsGreater','IsLesser','IsNull','IsNotNull','Likeliness','IsMatch','IsNotMatch','In','NotIn','Found','NotFound')
NOT NULL,
-> `description` varchar(255) NOT NULL,
-> `params` varchar(255) NOT NULL,
-> PRIMARY KEY (`rule_id`)
-> ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Query OK, 0 rows affected (0.11 sec)
So what to do now,
Actually I got the db. define_table() script by running the
extract_mysql_models.py script.
On Friday, 28 December 2012 12:19:22 UTC+5:30, rochacbruno wrote:
>
>
>
> On Fri, Dec 28, 2012 at 4:46 AM, ajith c t <[email protected]<javascript:>
> > wrote:
>
>> condition
>
>
> condition is a MySQL reserved keyword, you can't use this as the name of
> table or field
>
> http://dev.mysql.com/doc/refman/5.5/en/reserved-words.html
>
> To solve this kinf od problems.
>
> db = DAL("mysql....", check_reserved=["all"])
>
--