+8
-1
lines changedFilter options
+8
-1
lines changed Original file line number Diff line number Diff line change
@@ -270,7 +270,7 @@ public function createTable(Table $table, array $columns = [], array $indexes =
270
270
271
271
// set the primary key(s)
272
272
if (isset($options['primary_key'])) {
273
-
$pkSql = sprintf('CONSTRAINT PK_%s PRIMARY KEY (', $table->getName());
273
+
$pkSql = sprintf('CONSTRAINT PK_%s PRIMARY KEY (', str_replace('.', '_', $table->getName()));
274
274
if (is_string($options['primary_key'])) { // handle primary_key => 'id'
275
275
$pkSql .= $this->quoteColumnName($options['primary_key']);
276
276
} elseif (is_array($options['primary_key'])) { // handle primary_key => array('tag_id', 'resource_id')
Original file line number Diff line number Diff line change
@@ -199,6 +199,13 @@ public function testCreateTableWithNoPrimaryKey()
199
199
$this->assertFalse($this->adapter->hasColumn('atable', 'id'));
200
200
}
201
201
202
+
public function testCreateFullyQualifiedTable()
203
+
{
204
+
(new Table('dbo.qualified_table', [], $this->adapter))->create();
205
+
$this->assertTrue($this->adapter->hasTable('dbo.qualified_table'));
206
+
$this->assertTrue($this->adapter->hasPrimaryKey('qualified_table', 'id'));
207
+
}
208
+
202
209
public function testCreateTableWithConflictingPrimaryKeys()
203
210
{
204
211
$options = [
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4