-
Notifications
You must be signed in to change notification settings - Fork 288
Pootle schema util
Taras Semenenko edited this page Feb 27, 2017
·
3 revisions
# pootle schema
{
"collation": "utf8_general_ci",
"character_set": "utf8"
}
# pootle schema --tables
[
"pootle_config",
"pootle_app_directory",
"pootle_app_permissionset_positive_permissions",
...
]
# pootle schema app pootle_comment
{
"apps": {
"pootle_comment": {
"tables": {
"pootle_comment_comment": {
"indices": [
{
"key_name": "PRIMARY",
"non_unique": 0,
"column_name": "id"
},
{
"key_name": "pootle_commen_content_type_id_10a38e4a_fk_django_content_type_id",
"non_unique": 1,
"column_name": "content_type_id"
},
...
],
"fields": [
{
"collation": null,
"field": "id",
"type": "int(11)",
"key": "PRI",
"extra": "auto_increment"
},
{
"collation": "utf8_general_ci",
"field": "object_pk",
"type": "longtext",
"key": "",
"extra": ""
},
...
],
"constraints": [
{
"referenced_table_name": null,
"table_name": "pootle_comment_comment",
"referenced_column_name": null,
"constraint_name": "PRIMARY",
"column_name": "id"
},
{
"referenced_table_name": "django_content_type",
"table_name": "pootle_comment_comment",
"referenced_column_name": "id",
"constraint_name": "pootle_commen_content_type_id_10a38e4a_fk_django_content_type_id",
"column_name": "content_type_id"
},
...
],
},
...
},
...
}
}
}
# pootle schema table pootle_comment_comment [--all]
{
"pootle_comment_comment": {
"indices": [
{
"key_name": "PRIMARY",
"non_unique": 0,
"column_name": "id"
},
{
"key_name": "pootle_commen_content_type_id_10a38e4a_fk_django_content_type_id",
"non_unique": 1,
"column_name": "content_type_id"
},
...
],
"fields": [
{
"collation": null,
"field": "id",
"type": "int(11)",
"key": "PRI",
"extra": "auto_increment"
},
{
"collation": "utf8_general_ci",
"field": "object_pk",
"type": "longtext",
"key": "",
"extra": ""
},
...
],
"constraints": [
{
"referenced_table_name": null,
"table_name": "pootle_comment_comment",
"referenced_column_name": null,
"constraint_name": "PRIMARY",
"column_name": "id"
},
{
"referenced_table_name": "django_content_type",
"table_name": "pootle_comment_comment",
"referenced_column_name": "id",
"constraint_name": "pootle_commen_content_type_id_10a38e4a_fk_django_content_type_id",
"column_name": "content_type_id"
},
...
],
},
}
# pootle schema table pootle_comment_comment --constraints
{
"pootle_comment_comment": {
"constraints": [
{
"referenced_table_name": null,
"table_name": "pootle_comment_comment",
"referenced_column_name": null,
"constraint_name": "PRIMARY",
"column_name": "id"
},
{
"referenced_table_name": "django_content_type",
"table_name": "pootle_comment_comment",
"referenced_column_name": "id",
"constraint_name": "pootle_commen_content_type_id_10a38e4a_fk_django_content_type_id",
"column_name": "content_type_id"
},
...
],
},
}