Permalink
Browse files

adding in new migration for nullable fields

  • Loading branch information...
1 parent a70113d commit a24a7a004aac59bba4a14e4cc1e0354af8689e50 Daniel Petrie committed Oct 8, 2012
Showing with 47 additions and 0 deletions.
  1. +47 −0 migrations/2012_10_08_000000_users_nullable.php
@@ -0,0 +1,47 @@
+<?php
+/**
+ * Part of the Sentry bundle for Laravel.
+ *
+ * NOTICE OF LICENSE
+ *
+ * Licensed under the 3-clause BSD License.
+ *
+ * This source file is subject to the 3-clause BSD License that is
+ * bundled with this package in the LICENSE file. It is also available at
+ * the following URL: http://www.opensource.org/licenses/BSD-3-Clause
+ *
+ * @package Sentry
+ * @version 1.0
+ * @author Cartalyst LLC
+ * @license BSD License (3-clause)
+ * @copyright (c) 2011 - 2012, Cartalyst LLC
+ * @link http://cartalyst.com
+ */
+
+class Sentry_Users_Nullable
+{
+ /**
+ * Make changes to the database.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ DB::connection(Config::get('sentry::sentry.db_instance'))->pdo->query('ALTER TABLE '.Config::get('sentry::sentry.table.users').' MODIFY password_reset_hash varchar(200) null');
+ DB::connection(Config::get('sentry::sentry.db_instance'))->pdo->query('ALTER TABLE '.Config::get('sentry::sentry.table.users').' MODIFY temp_password varchar(200) null');
+ DB::connection(Config::get('sentry::sentry.db_instance'))->pdo->query('ALTER TABLE '.Config::get('sentry::sentry.table.users').' MODIFY remember_me varchar(200) null');
+ DB::connection(Config::get('sentry::sentry.db_instance'))->pdo->query('ALTER TABLE '.Config::get('sentry::sentry.table.users').' MODIFY activation_hash varchar(200) null');
+ DB::connection(Config::get('sentry::sentry.db_instance'))->pdo->query('ALTER TABLE '.Config::get('sentry::sentry.table.users').' MODIFY ip_address varchar(200) null');
+ }
+
+ /**
+ * Revert the changes to the database.
+ *
+ * @return void
+ */
+ public function down()
+ {
+
+ }
+
+}

0 comments on commit a24a7a0

Please sign in to comment.