• HUE中一些重要元数据表的DDL整理


    收集记录了一些HUE中常用的元数据表的表结构,主要有:

    • auth_permission
    • auth_user
    • axes_accessattempt
    • axes_accesslog
    • beeswax_queryhistory
    • beeswax_session
    • desktop_document2

    具体DDL如下:

    CREATE TABLE `auth_permission` (
      `id` int(11) NOT NULL AUTO_INCREMENT,
      `name` varchar(50) NOT NULL,
      `content_type_id` int(11) NOT NULL,
      `codename` varchar(100) NOT NULL,
      PRIMARY KEY (`id`),
      UNIQUE KEY `content_type_id` (`content_type_id`,`codename`),
      KEY `auth_permission_37ef4eb4` (`content_type_id`),
      CONSTRAINT `content_type_id_refs_id_d043b34a` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`)
    ) ENGINE=InnoDB AUTO_INCREMENT=226 DEFAULT CHARSET=utf8;
    
    CREATE TABLE `auth_user` (
      `id` int(11) NOT NULL AUTO_INCREMENT,
      `password` varchar(128) NOT NULL,
      `last_login` datetime NOT NULL,
      `is_superuser` tinyint(1) NOT NULL,
      `username` varchar(30) NOT NULL,
      `first_name` varchar(30) NOT NULL,
      `last_name` varchar(30) NOT NULL,
      `email` varchar(75) NOT NULL,
      `is_staff` tinyint(1) NOT NULL,
      `is_active` tinyint(1) NOT NULL,
      `date_joined` datetime NOT NULL,
      PRIMARY KEY (`id`),
      UNIQUE KEY `username` (`username`)
    ) ENGINE=InnoDB AUTO_INCREMENT=1100714 DEFAULT CHARSET=utf8;
    
    CREATE TABLE `axes_accessattempt` (
      `id` int(11) NOT NULL AUTO_INCREMENT,
      `user_agent` varchar(255) NOT NULL,
      `ip_address` char(39) DEFAULT NULL,
      `username` varchar(255) DEFAULT NULL,
      `trusted` tinyint(1) NOT NULL,
      `http_accept` varchar(1025) NOT NULL,
      `path_info` varchar(255) NOT NULL,
      `attempt_time` datetime NOT NULL,
      `get_data` longtext NOT NULL,
      `post_data` longtext NOT NULL,
      `failures_since_start` int(10) unsigned NOT NULL,
      PRIMARY KEY (`id`)
    ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
    
    CREATE TABLE `axes_accesslog` (
      `id` int(11) NOT NULL AUTO_INCREMENT,
      `user_agent` varchar(255) NOT NULL,
      `ip_address` char(39) DEFAULT NULL,
      `username` varchar(255) DEFAULT NULL,
      `trusted` tinyint(1) NOT NULL,
      `http_accept` varchar(1025) NOT NULL,
      `path_info` varchar(255) NOT NULL,
      `attempt_time` datetime NOT NULL,
      `logout_time` datetime DEFAULT NULL,
      PRIMARY KEY (`id`)
    ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
    CREATE TABLE `beeswax_queryhistory` (
      `submission_date` datetime NOT NULL,
      `last_state` int(11) NOT NULL,
      `server_id` varchar(1024) DEFAULT NULL,
      `log_context` varchar(1024) DEFAULT NULL,
      `design_id` int(11) DEFAULT NULL,
      `owner_id` int(11) NOT NULL,
      `query` longtext NOT NULL,
      `has_results` tinyint(1) NOT NULL,
      `id` int(11) NOT NULL AUTO_INCREMENT,
      `notify` tinyint(1) NOT NULL,
      `server_name` varchar(128) NOT NULL,
      `server_host` varchar(128) NOT NULL,
      `server_port` int(10) unsigned NOT NULL,
      `server_type` varchar(128) NOT NULL,
      `server_guid` varchar(1024) DEFAULT NULL,
      `operation_type` smallint(6),
      `modified_row_count` double,
      `statement_number` smallint(6) NOT NULL,
      `query_type` smallint(6) NOT NULL,
      `is_redacted` tinyint(1) NOT NULL,
      `extra` longtext NOT NULL,
      `is_cleared` tinyint(1) NOT NULL,
      PRIMARY KEY (`id`),
      KEY `beeswax_queryhistory_bfe02e93` (`last_state`),
      KEY `beeswax_queryhistory_38ebade8` (`design_id`),
      KEY `beeswax_queryhistory_cb902d83` (`owner_id`),
      CONSTRAINT `design_id_refs_id_f8250ba5` FOREIGN KEY (`design_id`) REFERENCES `beeswax_savedquery` (`id`),
      CONSTRAINT `owner_id_refs_id_d5c13755` FOREIGN KEY (`owner_id`) REFERENCES `auth_user` (`id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
    
    CREATE TABLE `beeswax_session` (
      `last_used` datetime NOT NULL,
      `status_code` smallint(5) unsigned NOT NULL,
      `server_protocol_version` smallint(6) NOT NULL,
      `secret` longtext NOT NULL,
      `owner_id` int(11) NOT NULL,
      `guid` longtext NOT NULL,
      `id` int(11) NOT NULL AUTO_INCREMENT,
      `application` varchar(128) NOT NULL,
      `properties` longtext NOT NULL,
      PRIMARY KEY (`id`),
      KEY `beeswax_session_cdfd3889` (`last_used`),
      KEY `beeswax_session_cb902d83` (`owner_id`),
      CONSTRAINT `owner_id_refs_id_0417c1ac` FOREIGN KEY (`owner_id`) REFERENCES `auth_user` (`id`)
    ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
    
    CREATE TABLE `desktop_document2` (
      `id` int(11) NOT NULL AUTO_INCREMENT,
      `owner_id` int(11) NOT NULL,
      `name` varchar(255) NOT NULL,
      `description` longtext NOT NULL,
      `uuid` varchar(36) NOT NULL,
      `type` varchar(32) NOT NULL,
      `data` longtext NOT NULL,
      `extra` longtext NOT NULL,
      `last_modified` datetime NOT NULL,
      `version` smallint(6) NOT NULL,
      `is_history` tinyint(1) NOT NULL,
      `parent_directory_id` int(11),
      PRIMARY KEY (`id`),
      UNIQUE KEY `desktop_document2_uuid_71ec93c81d6e68e7_uniq` (`uuid`,`version`,`is_history`),
      KEY `desktop_document2_cb902d83` (`owner_id`),
      KEY `desktop_document2_6f6e1b62` (`uuid`),
      KEY `desktop_document2_403d8ff3` (`type`),
      KEY `desktop_document2_5ccb38e5` (`last_modified`),
      KEY `desktop_document2_f516c2b3` (`version`),
      KEY `desktop_document2_dd08191e` (`is_history`),
      KEY `desktop_document2_9ffde453` (`parent_directory_id`),
      CONSTRAINT `parent_directory_id_refs_id_4fe2babf` FOREIGN KEY (`parent_directory_id`) REFERENCES `desktop_document2` (`id`),
      CONSTRAINT `owner_id_refs_id_04b63201` FOREIGN KEY (`owner_id`) REFERENCES `auth_user` (`id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
    
  • 相关阅读:
    ACM-ICPC 2018 徐州赛区网络预赛 Morgana Net
    ACM-ICPC 2018 焦作赛区网络预赛 E. Jiu Yuan Wants to Eat ,树链抛分+线段树
    ACM-ICPC 2018 焦作赛区网络预赛 Poor God Water 矩阵快速幂
    ACM-ICPC 2018 南京赛区网络预赛 E AC Challenge 状压dp
    codeforces 776 D The Door Problem
    codeforces 765 E Tree Folding
    codeforces 765 D Artsem and Saunders
    P2764 最小路径覆盖问题
    SPOJ Count on a tree 主席树+lca
    BZOJ 1066 蜥蜴
  • 原文地址:https://www.cnblogs.com/lestatzhang/p/10611302.html
Copyright © 2020-2023  润新知