{
	"before": {
		"name": "globaluser",
		"comment": "Global account data.",
		"columns": [
			{
				"name": "gu_id",
				"comment": "Internal unique ID for the authentication server",
				"type": "integer",
				"options": { "autoincrement": true, "notnull": false }
			},
			{
				"name": "gu_name",
				"comment": "Username.",
				"type": "binary",
				"options": { "notnull": false, "length": 255 }
			},
			{
				"name": "gu_home_db",
				"comment": "Local database name of the user's 'home' wiki. By default, the 'winner' of a migration check for old accounts or the account the user was first registered at for new ones. May be changed over time.",
				"type": "binary",
				"options": { "notnull": false, "length": 255 }
			},
			{
				"name": "gu_email",
				"comment": "Registered email address, may be empty.",
				"type": "binary",
				"options": { "notnull": false, "length": 255 }
			},
			{
				"name": "gu_email_authenticated",
				"comment": "Timestamp when the address was confirmed as belonging to the user. NULL if not confirmed.",
				"type": "mwtimestamp",
				"options": { "notnull": false }
			},
			{
				"name": "gu_salt",
				"comment": "Salt. For migrated passwords, the salt is the local user_id.",
				"type": "binary",
				"options": { "notnull": false, "length": 16 }
			},
			{
				"name": "gu_password",
				"comment": "hashed password",
				"type": "blob",
				"options": { "notnull": false, "length": 255 }
			},
			{
				"name": "gu_locked",
				"comment": "If true, this account cannot be used to log in on any wiki.",
				"type": "mwtinyint",
				"options": { "notnull": true, "length": 1, "default": 0 }
			},
			{
				"name": "gu_hidden_level",
				"comment": "If true, this account should be hidden from most public user lists. Used for 'deleting' accounts without breaking referential integrity.",
				"type": "integer",
				"options": { "notnull": true, "default": 0 }
			},
			{
				"name": "gu_registration",
				"comment": "Registration time",
				"type": "mwtimestamp",
				"options": { "notnull": false }
			},
			{
				"name": "gu_password_reset_key",
				"comment": "Random key for password resets",
				"type": "blob",
				"options": { "notnull": false, "length": 255 }
			},
			{
				"name": "gu_password_reset_expiration",
				"type": "mwtimestamp",
				"options": { "notnull": false }
			},
			{
				"name": "gu_auth_token",
				"comment": "Random key for crosswiki authentication tokens",
				"type": "binary",
				"options": { "notnull": false, "length": 32 }
			},
			{
				"name": "gu_cas_token",
				"comment": "Value used for CAS operations",
				"type": "integer",
				"options": { "notnull": true, "unsigned": true, "default": 1 }
			}
		],
		"indexes": [
			{
				"name": "gu_name",
				"columns": [ "gu_name" ],
				"unique": true
			},
			{
				"name": "gu_email",
				"columns": [ "gu_email" ],
				"unique": false
			},
			{
				"name": "gu_locked",
				"columns": [ "gu_name", "gu_locked" ],
				"options": { "lengths": [ 255, null ] },
				"unique": false
			},
			{
				"name": "gu_hidden_level",
				"columns": [ "gu_name", "gu_hidden_level" ],
				"options": { "lengths": [ 255, null ] },
				"unique": false
			}
		],
		"pk": [ "gu_id" ]
	},
	"after": {
		"name": "globaluser",
		"comment": "Global account data.",
		"columns": [
			{
				"name": "gu_id",
				"comment": "Internal unique ID for the authentication server",
				"type": "integer",
				"options": { "autoincrement": true, "notnull": false }
			},
			{
				"name": "gu_name",
				"comment": "Username.",
				"type": "binary",
				"options": { "notnull": false, "length": 255 }
			},
			{
				"name": "gu_home_db",
				"comment": "Local database name of the user's 'home' wiki. By default, the 'winner' of a migration check for old accounts or the account the user was first registered at for new ones. May be changed over time.",
				"type": "binary",
				"options": { "notnull": false, "length": 255 }
			},
			{
				"name": "gu_email",
				"comment": "Registered email address, may be empty.",
				"type": "binary",
				"options": { "notnull": false, "length": 255 }
			},
			{
				"name": "gu_email_authenticated",
				"comment": "Timestamp when the address was confirmed as belonging to the user. NULL if not confirmed.",
				"type": "mwtimestamp",
				"options": { "notnull": false }
			},
			{
				"name": "gu_password",
				"comment": "hashed password",
				"type": "blob",
				"options": { "notnull": false, "length": 255 }
			},
			{
				"name": "gu_locked",
				"comment": "If true, this account cannot be used to log in on any wiki.",
				"type": "mwtinyint",
				"options": { "notnull": true, "length": 1, "default": 0 }
			},
			{
				"name": "gu_hidden_level",
				"comment": "If true, this account should be hidden from most public user lists. Used for 'deleting' accounts without breaking referential integrity.",
				"type": "integer",
				"options": { "notnull": true, "default": 0 }
			},
			{
				"name": "gu_registration",
				"comment": "Registration time",
				"type": "mwtimestamp",
				"options": { "notnull": false }
			},
			{
				"name": "gu_password_reset_key",
				"comment": "Random key for password resets",
				"type": "blob",
				"options": { "notnull": false, "length": 255 }
			},
			{
				"name": "gu_password_reset_expiration",
				"type": "mwtimestamp",
				"options": { "notnull": false }
			},
			{
				"name": "gu_auth_token",
				"comment": "Random key for crosswiki authentication tokens",
				"type": "binary",
				"options": { "notnull": false, "length": 32 }
			},
			{
				"name": "gu_cas_token",
				"comment": "Value used for CAS operations",
				"type": "integer",
				"options": { "notnull": true, "unsigned": true, "default": 1 }
			}
		],
		"indexes": [
			{
				"name": "gu_name",
				"columns": [ "gu_name" ],
				"unique": true
			},
			{
				"name": "gu_email",
				"columns": [ "gu_email" ],
				"unique": false
			},
			{
				"name": "gu_locked",
				"columns": [ "gu_name", "gu_locked" ],
				"options": { "lengths": [ 255, null ] },
				"unique": false
			},
			{
				"name": "gu_hidden_level",
				"columns": [ "gu_name", "gu_hidden_level" ],
				"options": { "lengths": [ 255, null ] },
				"unique": false
			}
		],
		"pk": [ "gu_id" ]
	}
}
