Page MenuHomeDevCentral

Start user accounts ID with a large value
ClosedPublic

Authored by dereckson on May 21 2016, 21:07.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 14, 17:46
Unknown Object (File)
Fri, Nov 8, 22:23
Unknown Object (File)
Wed, Nov 6, 23:56
Unknown Object (File)
Wed, Nov 6, 22:49
Unknown Object (File)
Sun, Nov 3, 14:41
Unknown Object (File)
Thu, Oct 31, 16:33
Unknown Object (File)
Tue, Oct 29, 12:47
Unknown Object (File)
Sat, Oct 26, 04:52
Subscribers
None

Details

Summary
Test Plan
  • php artisan migrate
  • Ensure auto increment value is now gigantic
  • Rollback
  • Ensure auto increment value is the last user id value + 1.

Diff Detail

Repository
rGROVE Auth Grove
Lint
No Lint Coverage
Unit
No Test Coverage
Branch
T830
Build Status
Buildable 511
Build 626: arc lint + arc unit

Event Timeline

dereckson retitled this revision from to Start user accounts ID with a large value.
dereckson updated this object.
dereckson edited the test plan for this revision. (Show Details)
dereckson added a reviewer: dereckson.
dereckson edited the test plan for this revision. (Show Details)
dereckson edited edge metadata.
Migrate test
$ php artisan migrate
Migrated: 2016_05_21_224200_set_users_table_auto_increment
$ php artisan tinker
>>> DB::select("SHOW CREATE TABLE users");
=> [
     {#698
       +"Table": "users"
       +"Create Table": """
         CREATE TABLE `users` (
           `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
           `username` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
           `fullname` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
           `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
           `password` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
           `remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
           `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
           `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
           PRIMARY KEY (`id`),
           UNIQUE KEY `users_email_unique` (`email`)
         ) ENGINE=InnoDB AUTO_INCREMENT=1000000000 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci"""
     }
   ]
Rollback test
$ composer dump-autoload
$ php artisan migrate:rollback
Rolled back: 2016_05_21_224200_set_users_table_auto_increment
$ php artisan tinker
>>> DB::select("SHOW CREATE TABLE users");                                                                
=> [
     {#696
       +"Table": "users"
       +"Create Table": """
         CREATE TABLE `users` (
           `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
           `username` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
           `fullname` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
           `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
           `password` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
           `remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
           `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
           `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
           PRIMARY KEY (`id`),
           UNIQUE KEY `users_email_unique` (`email`)
         ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci"""
     }
   ]
dereckson edited edge metadata.
This revision is now accepted and ready to land.May 21 2016, 21:14
This revision was automatically updated to reflect the committed changes.