Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
302
Merge Requests
302
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
14677a3b
Commit
14677a3b
authored
Oct 06, 2012
by
webchick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#1741462
by Liam Morland: Fixed Reorder schema definitions.
parent
7bd2b2c3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
174 additions
and
174 deletions
+174
-174
core/modules/taxonomy/taxonomy.install
core/modules/taxonomy/taxonomy.install
+62
-62
core/modules/user/user.install
core/modules/user/user.install
+112
-112
No files found.
core/modules/taxonomy/taxonomy.install
View file @
14677a3b
...
...
@@ -23,6 +23,68 @@ function taxonomy_uninstall() {
* Implements hook_schema().
*/
function
taxonomy_schema
()
{
$schema
[
'taxonomy_vocabulary'
]
=
array
(
'description'
=>
'Stores vocabulary information.'
,
'fields'
=>
array
(
'vid'
=>
array
(
'type'
=>
'serial'
,
'unsigned'
=>
TRUE
,
'not null'
=>
TRUE
,
'description'
=>
'Primary Key: Unique vocabulary ID.'
,
),
'langcode'
=>
array
(
'description'
=>
'The {language}.langcode of this vocabulary.'
,
'type'
=>
'varchar'
,
'length'
=>
12
,
'not null'
=>
TRUE
,
'default'
=>
''
,
),
'name'
=>
array
(
'type'
=>
'varchar'
,
'length'
=>
255
,
'not null'
=>
TRUE
,
'default'
=>
''
,
'description'
=>
'Name of the vocabulary.'
,
'translatable'
=>
TRUE
,
),
'machine_name'
=>
array
(
'type'
=>
'varchar'
,
'length'
=>
255
,
'not null'
=>
TRUE
,
'default'
=>
''
,
'description'
=>
'The vocabulary machine name.'
,
),
'description'
=>
array
(
'type'
=>
'text'
,
'not null'
=>
FALSE
,
'size'
=>
'big'
,
'description'
=>
'Description of the vocabulary.'
,
'translatable'
=>
TRUE
,
),
'hierarchy'
=>
array
(
'type'
=>
'int'
,
'unsigned'
=>
TRUE
,
'not null'
=>
TRUE
,
'default'
=>
0
,
'size'
=>
'tiny'
,
'description'
=>
'The type of hierarchy allowed within the vocabulary. (0 = disabled, 1 = single, 2 = multiple)'
,
),
'weight'
=>
array
(
'type'
=>
'int'
,
'not null'
=>
TRUE
,
'default'
=>
0
,
'description'
=>
'The weight of this vocabulary in relation to other vocabularies.'
,
),
),
'primary key'
=>
array
(
'vid'
),
'indexes'
=>
array
(
'list'
=>
array
(
'weight'
,
'name'
),
),
'unique keys'
=>
array
(
'machine_name'
=>
array
(
'machine_name'
),
),
);
$schema
[
'taxonomy_term_data'
]
=
array
(
'description'
=>
'Stores term information.'
,
'fields'
=>
array
(
...
...
@@ -127,68 +189,6 @@ function taxonomy_schema() {
'primary key'
=>
array
(
'tid'
,
'parent'
),
);
$schema
[
'taxonomy_vocabulary'
]
=
array
(
'description'
=>
'Stores vocabulary information.'
,
'fields'
=>
array
(
'vid'
=>
array
(
'type'
=>
'serial'
,
'unsigned'
=>
TRUE
,
'not null'
=>
TRUE
,
'description'
=>
'Primary Key: Unique vocabulary ID.'
,
),
'langcode'
=>
array
(
'description'
=>
'The {language}.langcode of this vocabulary.'
,
'type'
=>
'varchar'
,
'length'
=>
12
,
'not null'
=>
TRUE
,
'default'
=>
''
,
),
'name'
=>
array
(
'type'
=>
'varchar'
,
'length'
=>
255
,
'not null'
=>
TRUE
,
'default'
=>
''
,
'description'
=>
'Name of the vocabulary.'
,
'translatable'
=>
TRUE
,
),
'machine_name'
=>
array
(
'type'
=>
'varchar'
,
'length'
=>
255
,
'not null'
=>
TRUE
,
'default'
=>
''
,
'description'
=>
'The vocabulary machine name.'
,
),
'description'
=>
array
(
'type'
=>
'text'
,
'not null'
=>
FALSE
,
'size'
=>
'big'
,
'description'
=>
'Description of the vocabulary.'
,
'translatable'
=>
TRUE
,
),
'hierarchy'
=>
array
(
'type'
=>
'int'
,
'unsigned'
=>
TRUE
,
'not null'
=>
TRUE
,
'default'
=>
0
,
'size'
=>
'tiny'
,
'description'
=>
'The type of hierarchy allowed within the vocabulary. (0 = disabled, 1 = single, 2 = multiple)'
,
),
'weight'
=>
array
(
'type'
=>
'int'
,
'not null'
=>
TRUE
,
'default'
=>
0
,
'description'
=>
'The weight of this vocabulary in relation to other vocabularies.'
,
),
),
'primary key'
=>
array
(
'vid'
),
'indexes'
=>
array
(
'list'
=>
array
(
'weight'
,
'name'
),
),
'unique keys'
=>
array
(
'machine_name'
=>
array
(
'machine_name'
),
),
);
$schema
[
'taxonomy_index'
]
=
array
(
'description'
=>
'Maintains denormalized information about node/term relationships.'
,
'fields'
=>
array
(
...
...
core/modules/user/user.install
View file @
14677a3b
...
...
@@ -9,118 +9,6 @@
* Implements hook_schema().
*/
function
user_schema
()
{
$schema
[
'authmap'
]
=
array
(
'description'
=>
'Stores distributed authentication mapping.'
,
'fields'
=>
array
(
'aid'
=>
array
(
'description'
=>
'Primary Key: Unique authmap ID.'
,
'type'
=>
'serial'
,
'unsigned'
=>
TRUE
,
'not null'
=>
TRUE
,
),
'uid'
=>
array
(
'type'
=>
'int'
,
'unsigned'
=>
TRUE
,
'not null'
=>
TRUE
,
'default'
=>
0
,
'description'
=>
"User's
{
users
}
.uid."
,
),
'authname'
=>
array
(
'type'
=>
'varchar'
,
'length'
=>
128
,
'not null'
=>
TRUE
,
'default'
=>
''
,
'description'
=>
'Unique authentication name.'
,
),
'module'
=>
array
(
'type'
=>
'varchar'
,
'length'
=>
128
,
'not null'
=>
TRUE
,
'default'
=>
''
,
'description'
=>
'Module which is controlling the authentication.'
,
),
),
'unique keys'
=>
array
(
'authname'
=>
array
(
'authname'
),
),
'primary key'
=>
array
(
'aid'
),
'foreign keys'
=>
array
(
'user'
=>
array
(
'table'
=>
'users'
,
'columns'
=>
array
(
'uid'
=>
'uid'
),
),
),
);
$schema
[
'role_permission'
]
=
array
(
'description'
=>
'Stores the permissions assigned to user roles.'
,
'fields'
=>
array
(
'rid'
=>
array
(
'type'
=>
'varchar'
,
'length'
=>
64
,
'not null'
=>
TRUE
,
'description'
=>
'Foreign Key: {role}.rid.'
,
),
'permission'
=>
array
(
'type'
=>
'varchar'
,
'length'
=>
128
,
'not null'
=>
TRUE
,
'default'
=>
''
,
'description'
=>
'A single permission granted to the role identified by rid.'
,
),
'module'
=>
array
(
'type'
=>
'varchar'
,
'length'
=>
255
,
'not null'
=>
TRUE
,
'default'
=>
''
,
'description'
=>
"The module declaring the permission."
,
),
),
'primary key'
=>
array
(
'rid'
,
'permission'
),
'indexes'
=>
array
(
'permission'
=>
array
(
'permission'
),
),
'foreign keys'
=>
array
(
'role'
=>
array
(
'table'
=>
'role'
,
'columns'
=>
array
(
'rid'
=>
'rid'
),
),
),
);
$schema
[
'role'
]
=
array
(
'description'
=>
'Stores user roles.'
,
'fields'
=>
array
(
'rid'
=>
array
(
'type'
=>
'varchar'
,
// The role ID is often used as part of a compound index; at least MySQL
// has a maximum index length of 1000 characters (333 on utf8), so we
// limit the maximum length.
'length'
=>
64
,
'not null'
=>
TRUE
,
'description'
=>
'Primary Key: Unique role ID.'
,
),
'name'
=>
array
(
'type'
=>
'varchar'
,
'length'
=>
255
,
'not null'
=>
TRUE
,
'default'
=>
''
,
'description'
=>
'Role label.'
,
'translatable'
=>
TRUE
,
),
'weight'
=>
array
(
'type'
=>
'int'
,
'not null'
=>
TRUE
,
'default'
=>
0
,
'description'
=>
'The weight of this role in listings and the user interface.'
,
),
),
'primary key'
=>
array
(
'rid'
),
'indexes'
=>
array
(
'name_weight'
=>
array
(
'name'
,
'weight'
),
),
);
// The table name here is plural, despite Drupal table naming standards,
// because "user" is a reserved word in many databases.
$schema
[
'users'
]
=
array
(
...
...
@@ -272,6 +160,118 @@ function user_schema() {
),
);
$schema
[
'authmap'
]
=
array
(
'description'
=>
'Stores distributed authentication mapping.'
,
'fields'
=>
array
(
'aid'
=>
array
(
'description'
=>
'Primary Key: Unique authmap ID.'
,
'type'
=>
'serial'
,
'unsigned'
=>
TRUE
,
'not null'
=>
TRUE
,
),
'uid'
=>
array
(
'type'
=>
'int'
,
'unsigned'
=>
TRUE
,
'not null'
=>
TRUE
,
'default'
=>
0
,
'description'
=>
"User's
{
users
}
.uid."
,
),
'authname'
=>
array
(
'type'
=>
'varchar'
,
'length'
=>
128
,
'not null'
=>
TRUE
,
'default'
=>
''
,
'description'
=>
'Unique authentication name.'
,
),
'module'
=>
array
(
'type'
=>
'varchar'
,
'length'
=>
128
,
'not null'
=>
TRUE
,
'default'
=>
''
,
'description'
=>
'Module which is controlling the authentication.'
,
),
),
'unique keys'
=>
array
(
'authname'
=>
array
(
'authname'
),
),
'primary key'
=>
array
(
'aid'
),
'foreign keys'
=>
array
(
'user'
=>
array
(
'table'
=>
'users'
,
'columns'
=>
array
(
'uid'
=>
'uid'
),
),
),
);
$schema
[
'role'
]
=
array
(
'description'
=>
'Stores user roles.'
,
'fields'
=>
array
(
'rid'
=>
array
(
'type'
=>
'varchar'
,
// The role ID is often used as part of a compound index; at least MySQL
// has a maximum index length of 1000 characters (333 on utf8), so we
// limit the maximum length.
'length'
=>
64
,
'not null'
=>
TRUE
,
'description'
=>
'Primary Key: Unique role ID.'
,
),
'name'
=>
array
(
'type'
=>
'varchar'
,
'length'
=>
255
,
'not null'
=>
TRUE
,
'default'
=>
''
,
'description'
=>
'Role label.'
,
'translatable'
=>
TRUE
,
),
'weight'
=>
array
(
'type'
=>
'int'
,
'not null'
=>
TRUE
,
'default'
=>
0
,
'description'
=>
'The weight of this role in listings and the user interface.'
,
),
),
'primary key'
=>
array
(
'rid'
),
'indexes'
=>
array
(
'name_weight'
=>
array
(
'name'
,
'weight'
),
),
);
$schema
[
'role_permission'
]
=
array
(
'description'
=>
'Stores the permissions assigned to user roles.'
,
'fields'
=>
array
(
'rid'
=>
array
(
'type'
=>
'varchar'
,
'length'
=>
64
,
'not null'
=>
TRUE
,
'description'
=>
'Foreign Key: {role}.rid.'
,
),
'permission'
=>
array
(
'type'
=>
'varchar'
,
'length'
=>
128
,
'not null'
=>
TRUE
,
'default'
=>
''
,
'description'
=>
'A single permission granted to the role identified by rid.'
,
),
'module'
=>
array
(
'type'
=>
'varchar'
,
'length'
=>
255
,
'not null'
=>
TRUE
,
'default'
=>
''
,
'description'
=>
"The module declaring the permission."
,
),
),
'primary key'
=>
array
(
'rid'
,
'permission'
),
'indexes'
=>
array
(
'permission'
=>
array
(
'permission'
),
),
'foreign keys'
=>
array
(
'role'
=>
array
(
'table'
=>
'role'
,
'columns'
=>
array
(
'rid'
=>
'rid'
),
),
),
);
$schema
[
'users_roles'
]
=
array
(
'description'
=>
'Maps users to roles.'
,
'fields'
=>
array
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment