Skip to content

Commit 5ed585b

Browse files
author
Phil Sturgeon
committed
Fixed conflict with migrations merge.
2 parents 05fa611 + 96bd33b commit 5ed585b

File tree

5 files changed

+398
-3
lines changed

5 files changed

+398
-3
lines changed

application/config/migration.php

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?php defined('BASEPATH') OR exit('No direct script access allowed');
2+
/*
3+
|--------------------------------------------------------------------------
4+
| Enable/Disable Migrations
5+
|--------------------------------------------------------------------------
6+
|
7+
| Migrations are disabled by default for security reasons.
8+
| You should enable migrations whenever you intend to do a schema migration
9+
| and disable it back when you're done.
10+
|
11+
*/
12+
$config['migration_enabled'] = TRUE;
13+
14+
15+
/*
16+
|--------------------------------------------------------------------------
17+
| Migrations version
18+
|--------------------------------------------------------------------------
19+
|
20+
| This is used to set migration version that the file system should be on.
21+
| If you run $this->migration->latest() this is the version that schema will
22+
| be upgraded / downgraded to.
23+
|
24+
*/
25+
$config['migration_version'] = 0;
26+
27+
28+
/*
29+
|--------------------------------------------------------------------------
30+
| Migrations Path
31+
|--------------------------------------------------------------------------
32+
|
33+
| Path to your migrations folder.
34+
| Typically, it will be within your application path.
35+
| Also, writing permission is required within the migrations path.
36+
|
37+
*/
38+
$config['migration_path'] = APPPATH . 'migrations/';
39+
40+
41+
/* End of file migration.php */
42+
/* Location: ./application/config/migration.php */

system/database/drivers/mysql/mysql_driver.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ function _from_tables($tables)
532532
*/
533533
function _insert($table, $keys, $values)
534534
{
535-
return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")";
535+
return "INSERT INTO ".$table." (`".implode('`, `', $keys)."`) VALUES (".implode(', ', $values).")";
536536
}
537537

538538
// --------------------------------------------------------------------
@@ -551,7 +551,7 @@ function _insert($table, $keys, $values)
551551
*/
552552
function _replace($table, $keys, $values)
553553
{
554-
return "REPLACE INTO ".$table." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")";
554+
return "REPLACE INTO ".$table." (`".implode('`, `', $keys)."`) VALUES (".implode(', ', $values).")";
555555
}
556556

557557
// --------------------------------------------------------------------
@@ -569,7 +569,7 @@ function _replace($table, $keys, $values)
569569
*/
570570
function _insert_batch($table, $keys, $values)
571571
{
572-
return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES ".implode(', ', $values);
572+
return "INSERT INTO ".$table." (`".implode('`, `', $keys)."`) VALUES ".implode(', ', $values);
573573
}
574574

575575
// --------------------------------------------------------------------
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
$lang['migration_none_found'] = "No migrations were found.";
4+
$lang['migration_not_found'] = "This migration could not be found.";
5+
$lang['migration_multiple_version'] = "This are multiple migrations with the same version number: %d.";
6+
$lang['migration_class_doesnt_exist'] = "The migration class \"%s\" could not be found.";
7+
$lang['migration_missing_up_method'] = "The migration class \"%s\" is missing an 'up' method.";
8+
$lang['migration_missing_down_method'] = "The migration class \"%s\" is missing an 'up' method.";
9+
$lang['migration_invalid_filename'] = "Migration \"%s\" has an invalid filename.";
10+
11+
12+
/* End of file migration_lang.php */
13+
/* Location: ./system/language/english/migration_lang.php */

0 commit comments

Comments
 (0)