Skip to content

Commit 4c8e654

Browse files
authored
Merge pull request #105 from RonasIT/wrap-table-name-into-double-quotes-in-dumps
feat: Wrap table name into double quotes in dumps
2 parents bce8e2a + 97c43e3 commit 4c8e654

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

stubs/dumps/mysql.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@foreach($inserts as $entities)
22
@foreach($entities['items'] as $entity)
3-
INSERT INTO {{$entities['name']}}({!! implode(', ', $entity['fields']) !!}, created_at, updated_at) VALUES
3+
INSERT INTO "{{$entities['name']}}"({!! implode(', ', $entity['fields']) !!}, created_at, updated_at) VALUES
44
({!! implode(', ', $entity['values']) !!}, '2016-10-20 11:05:00', '2016-10-20 11:05:00');
55
@endforeach
66

stubs/dumps/pgsql.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@foreach($inserts as $entities)
22
@foreach($entities['items'] as $entity)
3-
INSERT INTO {{$entities['name']}}({!! implode(', ', $entity['fields']) !!}, created_at, updated_at) VALUES
3+
INSERT INTO "{{$entities['name']}}"({!! implode(', ', $entity['fields']) !!}, created_at, updated_at) VALUES
44
({!! implode(', ', $entity['values']) !!}, '2016-10-20 11:05:00', '2016-10-20 11:05:00');
55
@endforeach
66

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
INSERT INTO welcome_bonuses(id, title, name, created_at, updated_at) VALUES
1+
INSERT INTO "welcome_bonuses"(id, title, name, created_at, updated_at) VALUES
22
(1, 1, 1, '2016-10-20 11:05:00', '2016-10-20 11:05:00');
33

0 commit comments

Comments
 (0)