Skip to content

Instantly share code, notes, and snippets.

@mathiasgrimm
Created January 15, 2015 00:14
Show Gist options
  • Save mathiasgrimm/74f55db4791a71ce04dd to your computer and use it in GitHub Desktop.
Save mathiasgrimm/74f55db4791a71ce04dd to your computer and use it in GitHub Desktop.
diff --git a/src/Illuminate/Database/Schema/Blueprint.php b/src/Illuminate/Database/Schema/Blueprint.php
index cb3de29..a8da812 100755
--- a/src/Illuminate/Database/Schema/Blueprint.php
+++ b/src/Illuminate/Database/Schema/Blueprint.php
@@ -633,7 +633,7 @@ class Blueprint {
{
$this->timestamp('created_at');
- $this->timestamp('updated_at');
+ $this->timestamp('updated_at')->nullable();
}
/**
diff --git a/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php b/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php
index 90210ab..2a0908e 100755
--- a/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php
+++ b/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php
@@ -479,7 +479,7 @@ class MySqlGrammar extends Grammar {
*/
protected function typeTimestamp(Fluent $column)
{
- if ( ! $column->nullable) return 'timestamp default 0';
+// if ( ! $column->nullable) return 'timestamp default 0';
return 'timestamp';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment