Skip to content
Permalink
Browse files

Removing baseType from the output of Table::column()

This makes the output less confusing and also more backwards compatible
  • Loading branch information...
lorenzo committed Jul 10, 2015
1 parent 0e57767 commit 722cbf8680cbf790eb4e48649713af7bf06e009c
@@ -321,7 +321,9 @@ public function column($name)
if (!isset($this->_columns[$name])) {
return null;
}
return $this->_columns[$name];
$column = $this->_columns[$name];
unset($column['baseType']);
return $column;
}
/**
@@ -254,7 +254,6 @@ public function testDescribeTable()
$expected = [
'id' => [
'type' => 'biginteger',
'baseType' => null,
'null' => false,
'unsigned' => false,
'default' => null,
@@ -265,7 +264,6 @@ public function testDescribeTable()
],
'title' => [
'type' => 'string',
'baseType' => null,
'null' => true,
'default' => null,
'length' => 20,
@@ -275,7 +273,6 @@ public function testDescribeTable()
],
'body' => [
'type' => 'text',
'baseType' => null,
'null' => true,
'default' => null,
'length' => null,
@@ -284,7 +281,6 @@ public function testDescribeTable()
],
'author_id' => [
'type' => 'integer',
'baseType' => null,
'null' => false,
'unsigned' => false,
'default' => null,
@@ -295,7 +291,6 @@ public function testDescribeTable()
],
'published' => [
'type' => 'boolean',
'baseType' => null,
'null' => true,
'default' => 0,
'length' => null,
@@ -304,7 +299,6 @@ public function testDescribeTable()
],
'allow_comments' => [
'type' => 'boolean',
'baseType' => null,
'null' => true,
'default' => 0,
'length' => null,
@@ -313,7 +307,6 @@ public function testDescribeTable()
],
'created' => [
'type' => 'datetime',
'baseType' => null,
'null' => true,
'default' => null,
'length' => null,
@@ -277,7 +277,6 @@ public function testDescribeTable()
$expected = [
'id' => [
'type' => 'biginteger',
'baseType' => null,
'null' => false,
'default' => null,
'length' => 20,
@@ -288,7 +287,6 @@ public function testDescribeTable()
],
'title' => [
'type' => 'string',
'baseType' => null,
'null' => true,
'default' => null,
'length' => 20,
@@ -298,7 +296,6 @@ public function testDescribeTable()
],
'body' => [
'type' => 'text',
'baseType' => null,
'null' => true,
'default' => null,
'length' => null,
@@ -307,7 +304,6 @@ public function testDescribeTable()
],
'author_id' => [
'type' => 'integer',
'baseType' => null,
'null' => false,
'default' => null,
'length' => 10,
@@ -318,7 +314,6 @@ public function testDescribeTable()
],
'published' => [
'type' => 'boolean',
'baseType' => null,
'null' => true,
'default' => 0,
'length' => null,
@@ -327,7 +322,6 @@ public function testDescribeTable()
],
'views' => [
'type' => 'integer',
'baseType' => null,
'null' => true,
'default' => 0,
'length' => 5,
@@ -338,7 +332,6 @@ public function testDescribeTable()
],
'created' => [
'type' => 'timestamp',
'baseType' => null,
'null' => true,
'default' => null,
'length' => null,
@@ -394,7 +387,6 @@ public function testDescribeTableWithDefaults()
$expected = [
'id' => [
'type' => 'integer',
'baseType' => null,
'null' => false,
'default' => null,
'length' => 10,
@@ -405,7 +397,6 @@ public function testDescribeTableWithDefaults()
],
'name' => [
'type' => 'string',
'baseType' => null,
'null' => true,
'default' => 'bob',
'length' => 50,
@@ -415,7 +406,6 @@ public function testDescribeTableWithDefaults()
],
'bio' => [
'type' => 'date',
'baseType' => null,
'null' => true,
'default' => null,
'length' => null,
@@ -424,7 +414,6 @@ public function testDescribeTableWithDefaults()
],
'position' => [
'type' => 'integer',
'baseType' => null,
'null' => true,
'default' => '1',
'length' => 10,
@@ -435,7 +424,6 @@ public function testDescribeTableWithDefaults()
],
'created' => [
'type' => 'timestamp',
'baseType' => null,
'null' => true,
'default' => null,
'length' => null,
@@ -277,7 +277,6 @@ public function testDescribeTable()
$expected = [
'id' => [
'type' => 'integer',
'baseType' => null,
'null' => false,
'default' => null,
'length' => null,
@@ -288,7 +287,6 @@ public function testDescribeTable()
],
'title' => [
'type' => 'string',
'baseType' => null,
'null' => true,
'default' => 'testing',
'length' => 20,
@@ -298,7 +296,6 @@ public function testDescribeTable()
],
'body' => [
'type' => 'text',
'baseType' => null,
'null' => true,
'default' => null,
'length' => null,
@@ -307,7 +304,6 @@ public function testDescribeTable()
],
'author_id' => [
'type' => 'integer',
'baseType' => null,
'null' => false,
'default' => null,
'length' => 11,
@@ -318,7 +314,6 @@ public function testDescribeTable()
],
'published' => [
'type' => 'boolean',
'baseType' => null,
'null' => true,
'default' => 0,
'length' => null,
@@ -327,7 +322,6 @@ public function testDescribeTable()
],
'created' => [
'type' => 'datetime',
'baseType' => null,
'null' => true,
'default' => null,
'length' => null,
@@ -283,7 +283,6 @@ public function testDescribeTable()
$expected = [
'id' => [
'type' => 'biginteger',
'baseType' => null,
'null' => false,
'default' => null,
'length' => 19,
@@ -294,7 +293,6 @@ public function testDescribeTable()
],
'title' => [
'type' => 'string',
'baseType' => null,
'null' => true,
'default' => null,
'length' => 20,
@@ -304,7 +302,6 @@ public function testDescribeTable()
],
'body' => [
'type' => 'string',
'baseType' => null,
'null' => true,
'default' => null,
'length' => 1000,
@@ -314,7 +311,6 @@ public function testDescribeTable()
],
'author_id' => [
'type' => 'integer',
'baseType' => null,
'null' => false,
'default' => null,
'length' => 10,
@@ -325,7 +321,6 @@ public function testDescribeTable()
],
'published' => [
'type' => 'boolean',
'baseType' => null,
'null' => true,
'default' => 0,
'length' => null,
@@ -334,7 +329,6 @@ public function testDescribeTable()
],
'views' => [
'type' => 'integer',
'baseType' => null,
'null' => true,
'default' => 0,
'length' => 5,
@@ -345,7 +339,6 @@ public function testDescribeTable()
],
'created' => [
'type' => 'timestamp',
'baseType' => null,
'null' => true,
'default' => null,
'length' => null,
@@ -205,7 +205,6 @@ public function testAddColumnFiltersAttributes()
$result = $table->column('title');
$expected = [
'type' => 'string',
'baseType' => null,
'length' => null,
'precision' => null,
'default' => null,
@@ -221,7 +220,6 @@ public function testAddColumnFiltersAttributes()
$result = $table->column('author_id');
$expected = [
'type' => 'integer',
'baseType' => null,
'length' => null,
'precision' => null,
'default' => null,
@@ -238,7 +236,6 @@ public function testAddColumnFiltersAttributes()
$result = $table->column('amount');
$expected = [
'type' => 'decimal',
'baseType' => null,
'length' => null,
'precision' => null,
'default' => null,

0 comments on commit 722cbf8

Please sign in to comment.
You can’t perform that action at this time.