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, Dec 12, 23:51
Unknown Object (File)
Thu, Dec 12, 23:30
Unknown Object (File)
Thu, Dec 12, 22:50
Unknown Object (File)
Thu, Dec 12, 05:45
Unknown Object (File)
Tue, Dec 10, 14:07
Unknown Object (File)
Wed, Dec 4, 01:53
Unknown Object (File)
Tue, Dec 3, 11:53
Unknown Object (File)
Mon, Dec 2, 04:57
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 510
Build 625: 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.