Seen here: http://drupal.org/node/1436384#comment-5723978

> Our SQL standards specify singular names for tables. "users" is still plural because "user" is a reserved word in many databases, and it was easier to just leave it as an exception than to try and figure out the insane escaping we'd need to do otherwise.

I've sometimes wondered why {users} didn't get converted to singular when other tables did.

Would be handy to have a one-line comment to this effect in user_schema() -- http://api.drupal.org/api/drupal/modules!user!user.install/function/user...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nmudgal’s picture

Status: Active » Needs review
FileSize
1.23 KB

Added comment in user_schema.
Patch is attached.

Thanks.

nmudgal’s picture

Version: 8.x-dev » 7.x-dev
FileSize
681 bytes

Same is the case with user_schema for D7 too.
So adding comment in it too.
Patch is attached.

Thanks.

nmudgal’s picture

oops wrong patch, sorry.

nmudgal’s picture

FileSize
550 bytes

I think it caught changes of another issue in patch file too.
Mah bad!

Thanks.

chertzog’s picture

Version: 7.x-dev » 8.x-dev
FileSize
601 bytes

You forgot to reset your changes after dealing with #1483664: Error in user.api.php. The patch should only address this issue. Here is a new one with a little better wording.

chertzog’s picture

Version: 8.x-dev » 7.x-dev
FileSize
579 bytes

And for D7.

nmudgal’s picture

Version: 7.x-dev » 8.x-dev
FileSize
570 bytes

For D8.

nmudgal’s picture

@chertzog yes I changed, my bad but committed another one the next seconds. :-)

joachim’s picture

Version: 8.x-dev » 7.x-dev
Status: Needs review » Needs work

Looks like there's still a bit of another patch in there ... ;)

Try 'git diff core/modules/user/user.install' to get just the changes for that file.

Though I do think we can do it in just one line. Like:

// Table name is plural despite Drupal naming standards as 'user' is a reserved word in many databases.

Hmm that's over 80 chars. But briefer at any rate.

chertzog’s picture

Rerolled for D7.

chertzog’s picture

Version: 7.x-dev » 8.x-dev
FileSize
451 bytes

And D8.

chertzog’s picture

Status: Needs work » Needs review

Review.

jhodgdon’s picture

Status: Needs review » Needs work

+ // Table name is plural despite Drupal naming standards as 'user' is a
+ // reserved word in many databases.

I think this would be clearer worded as:

The table name here is plural, despite Drupal table naming standards, because "user" is a reserved word in many databases.

nmudgal’s picture

Status: Needs work » Needs review
FileSize
473 bytes

Updated according to #13.

nmudgal’s picture

Version: 8.x-dev » 7.x-dev
FileSize
453 bytes

For D7.

nmudgal’s picture

Version: 7.x-dev » 8.x-dev
FileSize
473 bytes

I guess there is some issue with testbot as it is checking against drupal.core.version-7 so trying via uploading patch again & changing to 8.x [I think that's reason.]

Thanks.

jhodgdon’s picture

Status: Needs review » Needs work

Please leave issues as Drupal 8.x until they are fixed in 8.x, so that everyone looking at the issue queue knows it is a D8 issue. Once it is fixed in D8, it will be moved to D7, and marked with status "patch to be ported".

Also, only after an 8.x patch has been committed would I suggest working on a D7 patch. It is a waste of time/effort (effort which could be used to fix a differerent issue) to create a D7 patch over and over again while the D8 patch is being reworked and has not yet been accepted. It's better to just wait until the D8 fix is finalized, then do the D7 patch. Besides which, if the D8 patch can be applied to D7 (minus the core/ prefix on directories), the committer will typically just commit to both (if appropriate), saving everyone the time of porting the patch at all.

Meanwhile, the patch in #16 needs some work -- the line wrapping is too long. Comments should wrap to 80-character lines. See
http://drupal.org/node/1354#general
(which applies to in-code as well as doc block comments)

nmudgal’s picture

Status: Needs work » Needs review
FileSize
473 bytes

I guess I checked it was exactly 80 chars, anyways just rerolled it with moving one more word to next line so as to avoid any clash.

Thanks.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

The 80 character count includes the leading spaces. :)

Tor Arne Thune’s picture

Looks good :) I was wondering about that.

jhodgdon’s picture

I just clarified the limit on http://drupal.org/node/1354#general -- I thought it was clear before, but apparently not.

nmudgal’s picture

Yes I think it was clear, as I did count leading spaces too, but no harm in leaving it less than exceeding.

jhodgdon’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x/7.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.