noumo / easyii

Easy yii2 cms powered by Yii framework 2
http://easyiicms.com
593 stars 272 forks source link

install fail for postgresql #127

Open mdmunir opened 8 years ago

mdmunir commented 8 years ago
Exception 'yii\db\Exception' with message 'SQLSTATE[42601]: Syntax error: 7 ERROR:  syntax error at or near "ENGINE"
LINE 7: ) ENGINE=MyISAM DEFAULT CHARSET=utf8
          ^
The SQL being executed was: CREATE TABLE "easyii_admins" (
    "admin_id" serial NOT NULL PRIMARY KEY,
    "username" varchar(32) NOT NULL,
    "password" varchar(64) NOT NULL,
    "auth_key" varchar(128),
    "access_token" varchar(128)
) ENGINE=MyISAM DEFAULT CHARSET=utf8'
noumo commented 8 years ago

sorry, but easyiicms well developed primary for myssql.

mdmunir commented 8 years ago

:D https://github.com/yiisoft/yii2-app-advanced/blob/master/console/migrations/m130524_201442_init.php#L9-L13

bartek5186 commented 7 years ago

It can be used with PostgreSQL but after fixing migrations (index names, mysql function value() etc.), there are a lot of uses ` in sql execute methods in some controllers, that should be removed for postgresql. It's great idea make it working for postgres also (this should work with other databases too).