Skip to content

Commit

Permalink
Fix boolean columns clobbering subsequent tinyint columns (#55)
Browse files Browse the repository at this point in the history
* Fix boolean columns clobbering subsequent tinyint columns

* Start up the database before setting up the example files
  • Loading branch information
biggianteye authored Nov 22, 2018
1 parent e940632 commit 2e8e3f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ test-coverage-clover: ## Run all tests and output clover coverage to file.

.PHONY: example
example: ## Set up example project and schema
example: start-db
[ ! -f morphism.conf ] && cp example/morphism.conf.example morphism.conf || true
rm -rf schema schema2
mkdir -p schema/morphism-test schema2/morphism-test
Expand Down
2 changes: 2 additions & 0 deletions src/Parse/ColumnDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,8 @@ private function parseColumnDatatype(TokenStream $stream)
case 'bool':
case 'boolean':
$format = [1];
/* Take a copy so that edits don't make it back into the runtime cache. */
$typeInfo = clone $typeInfo;
$typeInfo->allowSign = false;
$typeInfo->allowZerofill = false;
break;
Expand Down

0 comments on commit 2e8e3f1

Please sign in to comment.