Skip to content
This repository was archived by the owner on Dec 10, 2018. It is now read-only.

Commit 10d88e1

Browse files
committed
Add table prefix support
1 parent 8dfc1df commit 10d88e1

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes to `laravel-binary-uuid` will be documented in this file
44

5+
## 1.1.2 - 2018-01-16
6+
7+
- add table prefix support
8+
59
## 1.1.0 - 2017-11-30
610

711
- add `getRouteKey` method

src/UuidServiceProvider.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,14 @@ protected function createGrammarFromConnection(Connection $connection): Grammar
3838
}
3939

4040
if ($queryGrammar instanceof IlluminateSQLiteGrammar) {
41-
return new SQLiteGrammar();
41+
$grammar = new SQLiteGrammar();
42+
} else {
43+
$grammar = new MySqlGrammar();
4244
}
4345

44-
return new MySqlGrammar();
46+
$grammar->setTablePrefix($queryGrammar->getTablePrefix());
47+
48+
return $grammar;
4549
}
4650

4751
protected function optimizeUuids()

0 commit comments

Comments
 (0)