Use uniform prefix with the column names Bug: T270033 Change-Id: I9ee1f8ac9a8d0e575e16344910495f341c2714db
59 lines
2.2 KiB
JSON
59 lines
2.2 KiB
JSON
{
|
|
"comment": "Rename user_properties_property index to up_property (T270033)",
|
|
"before": {
|
|
"name": "user_properties",
|
|
"comment": "User preferences and perhaps other fun stuff. :) Replaces the old user.user_options blob, with a couple nice properties: 1) We only store non-default settings, so changes to the defaults are now reflected for everybody, not just new accounts. 2) We can more easily do bulk lookups, statistics, or modifications of saved options since it's a sane table structure.",
|
|
"columns": [
|
|
{
|
|
"name": "up_user",
|
|
"comment": "Foreign key to user.user_id",
|
|
"type": "integer",
|
|
"options": { "unsigned": true, "notnull": true }
|
|
},
|
|
{
|
|
"name": "up_property",
|
|
"comment": "Name of the option being saved. This is indexed for bulk lookup.",
|
|
"type": "binary",
|
|
"options": { "length": 255, "notnull": true }
|
|
},
|
|
{
|
|
"name": "up_value",
|
|
"comment": "Property value as a string.",
|
|
"type": "blob",
|
|
"options": { "length": 65530, "notnull": false }
|
|
}
|
|
],
|
|
"indexes": [
|
|
{ "name": "user_properties_property", "columns": [ "up_property" ], "unique": false }
|
|
],
|
|
"pk": [ "up_user", "up_property" ]
|
|
},
|
|
"after": {
|
|
"name": "user_properties",
|
|
"comment": "User preferences and perhaps other fun stuff. :) Replaces the old user.user_options blob, with a couple nice properties: 1) We only store non-default settings, so changes to the defaults are now reflected for everybody, not just new accounts. 2) We can more easily do bulk lookups, statistics, or modifications of saved options since it's a sane table structure.",
|
|
"columns": [
|
|
{
|
|
"name": "up_user",
|
|
"comment": "Foreign key to user.user_id",
|
|
"type": "integer",
|
|
"options": { "unsigned": true, "notnull": true }
|
|
},
|
|
{
|
|
"name": "up_property",
|
|
"comment": "Name of the option being saved. This is indexed for bulk lookup.",
|
|
"type": "binary",
|
|
"options": { "length": 255, "notnull": true }
|
|
},
|
|
{
|
|
"name": "up_value",
|
|
"comment": "Property value as a string.",
|
|
"type": "blob",
|
|
"options": { "length": 65530, "notnull": false }
|
|
}
|
|
],
|
|
"indexes": [
|
|
{ "name": "up_property", "columns": [ "up_property" ], "unique": false }
|
|
],
|
|
"pk": [ "up_user", "up_property" ]
|
|
}
|
|
}
|