Jump to content

mysql user system tables.


bogdaniel

Recommended Posts

Can't see what would be difficult in here... anyway here's what I use in my current project.

 

CREATE TABLE  `users` (
  `ID` int(10) NOT NULL AUTO_INCREMENT COMMENT 'Primary key',
  `name` varchar(255) NOT NULL,
  `surname` varchar(255) NOT NULL,
  `login` varchar(255) NOT NULL,
  `password` char(32) NOT NULL,
  `active` tinyint(1) NOT NULL COMMENT 'Is the account active?',
  `registrationDate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

 

Can't see what would be difficult in here... anyway here's what I use in my current project.

 

CREATE TABLE  `users` (
  `ID` int(10) NOT NULL AUTO_INCREMENT COMMENT 'Primary key',
  `name` varchar(255) NOT NULL,
  `surname` varchar(255) NOT NULL,
  `login` varchar(255) NOT NULL,
  `password` char(32) NOT NULL,
  `active` tinyint(1) NOT NULL COMMENT 'Is the account active?',
  `registrationDate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

 

 

hello it's not dificult i just wanted onther opinion to see how others did .. maybe someone did something more better. :D

Well then. What you think about my table? ;)

it's nice i like it on my table i didn't had an active option and i've didn't add for the moment details about the user only username password registration date and i've made some changes about what i had changed vchar to char on password field. :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.