Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error after new collation added with oil #1513

Closed
InsiteFX opened this issue Sep 9, 2013 · 0 comments
Closed

Error after new collation added with oil #1513

InsiteFX opened this issue Sep 9, 2013 · 0 comments

Comments

@InsiteFX
Copy link

InsiteFX commented Sep 9, 2013

'default' => array(
    'type'        => 'mysqli',
    'connection'  => array(
        'hostname'   => 'localhost',
        'username'   => 'root',
        'password'   => '',
        'database'   => 'fuel_dev',
        'persistent' => false,
    ),
    'identifier'   => '`',
    'table_prefix' => '',
    'charset'      => 'utf8',
    'collation'    => 'utf8_unicode_ci',    //false,
    'enable_cache' => true,
    'profiling'    => false,
),

ERROR:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\Ray>cd c:\xampp\htdocs\fuelphp

c:\xampp\htdocs\fuelphp>
c:\xampp\htdocs\fuelphp>php oil refine migrate --packages=auth
Uncaught exception Fuel\Core\Database_Exception: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
for the right syntax to use near 'utf8' at line 5 [ CREATE TABLE IF NOT EXISTS migration (
type varchar(25) NOT NULL,
name varchar(50) NOT NULL,
migration varchar(100) DEFAULT '' NOT NULL
) DEFAULT utf8; ]
Callstack:
#0 C:\xampp\htdocs\fuelphp\fuel\core\classes\database\query.php(262): Fuel\Core\Database_MySQLi_Connection->query(2, 'CREATE TABLE IF...', false)
#1 C:\xampp\htdocs\fuelphp\fuel\core\classes\dbutil.php(135): Fuel\Core\Database_Query->execute(NULL)
#2 C:\xampp\htdocs\fuelphp\fuel\core\classes\migrate.php(593): Fuel\Core\DBUtil::create_table('migration', Array)
#3 C:\xampp\htdocs\fuelphp\fuel\core\classes\migrate.php(74): Fuel\Core\Migrate::table_version_check()
#4 [internal function]: Fuel\Core\Migrate::_init()
#5 C:\xampp\htdocs\fuelphp\fuel\core\classes\autoloader.php(364): call_user_func('Migrate::_init')
#6 C:\xampp\htdocs\fuelphp\fuel\core\classes\autoloader.php(247): Fuel\Core\Autoloader::init_class('Migrate')
#7 [internal function]: Fuel\Core\Autoloader::load('Migrate')
#8 C:\xampp\htdocs\fuelphp\fuel\core\tasks\migrate.php(206): spl_autoload_call('Migrate')
#9 C:\xampp\htdocs\fuelphp\fuel\core\tasks\migrate.php(163): Fuel\Tasks\Migrate::_run('auth', 'package')
#10 [internal function]: Fuel\Tasks\Migrate->__call('run', Array)
#11 [internal function]: Fuel\Tasks\Migrate->run()
#12 C:\xampp\htdocs\fuelphp\fuel\packages\oil\classes\refine.php(106): call_user_func_array(Array, Array)
#13 [internal function]: Oil\Refine::run('migrate', Array)
#14 C:\xampp\htdocs\fuelphp\fuel\packages\oil\classes\command.php(114): call_user_func('Oil\Refine::run', 'migrate', Array)
#15 C:\xampp\htdocs\fuelphp\oil(57): Oil\Command::init(Array)
#16 {main}

c:\xampp\htdocs\fuelphp>

This is what it should be producing:

CREATE TABLE IF NOT EXISTS name (
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant