django 用户管理相关的表
Django 用户管理相关的表:
- create table django_content_type (
- /*
- 内容类型表
- */
- id int(11) not null auto_increment,
- app_label varchar(100) not null,
- model varchar(100) not null,
- primary key (id),
- unique key uix_django_content_type_app_lable_model (app_label,model)
- )
- -- select * from django_content_type;
- -- +----+--------------+-------------+
- -- | id | app_label | model |
- -- +----+--------------+-------------+
- -- | 1 | admin | logentry |
- -- | 3 | auth | group |
- -- | 2 | auth | permission |
- -- | 4 | auth | user |
- -- | 5 | contenttypes | contenttype |
- -- | 6 | sessions | session |
- -- +----+--------------+-------------+
- create table auth_permission (
- /*
- 权限表
- */
- id int(11) not null auto_increment,
- name varchar(255) not null,
- content_type_id int(11) not null,
- codename varchar(100) not null,
- primary key (id),
- unique key uix__auth_permission_content_type_id_codename (content_type_id,codename),
- constraint uix__auth_permission_content_type_id foreign key (content_type_id) references django_content_type (id)
- )
- create table auth_user (
- /*
- 用户
- */
- id int(11) not null auto_increment,
- password varchar(128) not null,
- last_login datetime(6) DEFAULT NULL,
- is_superuser tinyint(1) not null,
- username varchar(150) not null,
- first_name varchar(30) not null,
- last_name varchar(150) not null,
- email varchar(254) not null,
- is_staff tinyint(1) not null,
- is_active tinyint(1) not null,
- date_joined datetime(6) not null,
- primary key (id),
- unique key username (username)
- )
- create table auth_group (
- /*
- 用户组
- */
- id int(11) not null auto_increment,
- name varchar(80) not null,
- primary key (id),
- unique key name (name)
- )
- create table auth_user_groups (
- /*
- 用户 + 组 关联关系表
- */
- id int(11) not null auto_increment,
- user_id int(11) not null,
- group_id int(11) not null,
- primary key (id),
- unique key uix__auth_user_groups_user_id_group_id (user_id,group_id),
- key ix_auth_user_groups_group_id (group_id),
- constraint fk_auth_user_groups_group_id foreign key (group_id) references auth_group (id),
- constraint fk_auth_user_groups_user_id foreign key (user_id) references auth_user (id)
- )
- create table auth_user_user_permissions (
- /*
- 用户权限
- */
- id int(11) not null auto_increment,
- user_id int(11) not null,
- permission_id int(11) not null,
- primary key (id),
- unique key uix_auth_user_user_permissions_user_id_permission_id (user_id,permission_id),
- key ix_auth_user_user_permissions_permission_id (permission_id),
- constraint fk_auth_user_user_permissions_permission_id foreign key (permission_id) references auth_permission (id),
- constraint fk_auth_user_user_permissions_user_id foreign key (user_id) references auth_user (id)
- )
- create table auth_group_permissions (
- /*
- 组权限
- */
- id int(11) not null auto_increment,
- group_id int(11) not null,
- permission_id int(11) not null,
- primary key (id),
- unique key uix_auth_group_permissions (group_id,permission_id),
- key ix__auth_group_permissions_permission_id (permission_id),
- constraint fk__auth_group_permissions_auth_permission_id foreign key (permission_id) references auth_permission (id),
- constraint fk__auth_group_permissions_auth_group_id foreign key (group_id) references auth_group (id)
- )
- create table django_admin_log (
- /*
- 日志表
- */
- id int(11) not null auto_increment,
- action_time datetime(6) not null,
- object_id longtext,
- object_repr varchar(200) not null,
- action_flag smallint(5) unsigned not null,
- change_message longtext not null,
- content_type_id int(11) DEFAULT NULL,
- user_id int(11) not null,
- primary key (id),
- key ix_django_admin_log_content_type_id (content_type_id),
- key ix_django_admin_log_user_id (user_id),
- constraint fk_django_admin_log_content_type_id foreign key (content_type_id) references django_content_type (id),
- constraint fk_django_admin_log_user_id foreign key (user_id) references auth_user (id)
- )
- create table django_session (
- /*
- 会话表
- */
- session_key varchar(40) not null,
- session_data longtext not null,
- expire_date datetime(6) not null,
- primary key (session_key),
- key ix_django_session_expire_date (expire_date)
- )
django 用户管理相关的表的更多相关文章
- linux 学习7 用户管理相关文件 r
7.1.用户配置文件 7.2.用户管理相关文件 7.3.用户管理命令 7.4.用户组管理命令 删除用户userdel [root@localhost ~]# userdel [-r] 用户名 //一定 ...
- 用户信息文件/etc/passwd,影子文件/etc/shadow,组信息文件/etc/group,组密码文件/etc/gshadow,用户管理相关文件
/etc/passwd man 5 passwd查看配置文件信息 account:password:UID:GID:GECOS:directory:shell 帐号:密码:用户ID:组ID:一般的信息 ...
- mysql命令大全用户管理相关命令
1.登陆 mysql>mysql -uJDev -p 2.用户管理 mysql>use mysql; 3.查看有哪些登陆用户 mysql> select host,user, ...
- centos的用户管理相关命令所在的包
用户管理命令是指:useradd userdel groupadd groupdel 这些 这些命令出自一个叫 shadow-utils 的包. 对于配置文件 /etc/shadow ,则来自一个叫 ...
- django 用户管理系列:1 user
:first-child{margin-top:0!important}.markdown-body>:last-child{margin-bottom:0!important}.markdow ...
- 6月21日 Django ORM那些相关操作(表关联、聚合查询和分组查询)
一.ForeignKey操作 正向查找 对象查找(跨表) 语法: 对象.关联字段.字段 示例: book_obj = models.Book.objects.first() # 第一本书对象 pr ...
- linux的用户管理相关配置文件
Linux的管理命令的本质不过是对配置文件/etc相关文件的修改罢了
- 【Python】解决Django Admin管理界面样式表(CSS Style)丢失问题
配置Django Admin,关于如何启用请参考Django官方文档<Activate the admin site>.但是我在配置过程中登录http://example.com/admi ...
- Linux用户和用户组管理 用户管理相关命令
用户添加命令 useradd 注意: 新添加的用户如果不设定密码是不能够登录系统的 命令格式: [root@localhost ~]#useradd [选项] 用户名 选项说明: 选项 选项说明 -u ...
随机推荐
- Linux安装和设置Samba服务器
1. 安装 安装前先关闭iptables和SELinux. Centos输入以下命令: yum install samba samba-client Ubuntu输入以下命令: apt-get ins ...
- 演示一下:rm -rf /
- 《Unix&Linux大学教程》学习笔记一:历史与常识
“为什么说Unix/Linux是自由的: 因为我们可以自己组装一个操作系统:Unix/Linux内核+其他实用工具+编程工具+GUI 因为我们可以自由地获取开源工作者 ...
- static_cast<void>(0)的意义及NDEBUG assert的使用
查看ace代码时发现如下代码 #define ACE_TEST_ASSERT(X) \ ((X) \ ? static_cast<) \ : ACE_VERSIONED_NAMESPACE_NA ...
- 【AIX】用户、组合安全管理
用户介绍 用户的概述 比如:我们在使用AIX系统的时候,同事需要使用我的计算机,但是我不想让他用我的用户登录,我的用户存在一些特殊信息,只能自己查看,此时就可以建立一个普通用户给他使用即可. 1.单用 ...
- 4、redis之使用commons-pool
增加池的配置文件redis-pool.properties: #最大能够保持idel状态的对象数 redis.pool.maxIdle=200 #当池内没有返回对象时,最大等待时间 redis.poo ...
- python 模块之os.path模块
# -*- coding: cp936 -*- #python 27 #xiaodeng #python 模块之os.path模块 #http://www.cnblogs.com/dkblog/arc ...
- 使用CodePush实时更新 React Native 和 Cordova 应用
近期公司的React native App(云订货)用上CodePush实时更新App技术了.棒棒的 CodePush 是微软开发的.能够实时更新 React Native 和 Cordova 应用. ...
- Nginx 日志改成 JSON 格式
Nginx 日志默认为普通文本的格式,例如,下面是 Nginx 的一行访问日志: 10.88.122.105 - - [02/Dec/2017:09:15:04 +0800] "GET /j ...
- Swift3 根据秒数获取视频时长(转换成00:00:00时间格式)以及将时长转换成秒
直接代码了: /// 秒转换成00:00:00格式 /// /// - Parameter secounds: <#secounds description#> /// - Returns ...