Browse Source

将二进制文件路径集成到配置文件并统一从配置文件读取 用户可通过安装引导程序进行配置

docker-svn
witersen 3 years ago
parent
commit
488918d272
  1. 4
      02.php/app/service/Svn.php
  2. 11
      02.php/app/service/Svnrep.php
  3. 12
      02.php/app/service/base/Base.php
  4. 17
      02.php/app/util/SVNAdmin/Core.php
  5. 6
      02.php/app/util/SVNAdmin/Group.php
  6. 44
      02.php/app/util/SVNAdmin/Rep.php
  7. 6
      02.php/app/util/SVNAdmin/User.php
  8. 6
      03.database/mysql/svnadmin.sql
  9. BIN
      03.database/sqlite/svnadmin.db
  10. 107
      03.database/sqlite/svnadmin.sql

4
02.php/app/service/Svn.php

@ -3,7 +3,7 @@
* @Author: witersen * @Author: witersen
* @Date: 2022-04-24 23:37:05 * @Date: 2022-04-24 23:37:05
* @LastEditors: witersen * @LastEditors: witersen
* @LastEditTime: 2022-05-08 20:30:34 * @LastEditTime: 2022-05-09 17:04:19
* @Description: QQ:1801168257 * @Description: QQ:1801168257
*/ */
@ -103,7 +103,7 @@ class Svn extends Base
//获取Subversion版本 //获取Subversion版本
$version = '-'; $version = '-';
if ($installed != 0) { if ($installed != 0) {
$versionInfo = FunShellExec('svnserve --version'); $versionInfo = FunShellExec(sprintf("'%s' --version", $this->config_bin['svnserve']));
$versionInfo = $versionInfo['result']; $versionInfo = $versionInfo['result'];
preg_match_all($this->config_reg['REG_SUBVERSION_VERSION'], $versionInfo, $versionInfoPreg); preg_match_all($this->config_reg['REG_SUBVERSION_VERSION'], $versionInfo, $versionInfoPreg);
if (array_key_exists(0, $versionInfoPreg[0])) { if (array_key_exists(0, $versionInfoPreg[0])) {

11
02.php/app/service/Svnrep.php

@ -3,7 +3,7 @@
* @Author: witersen * @Author: witersen
* @Date: 2022-04-24 23:37:05 * @Date: 2022-04-24 23:37:05
* @LastEditors: witersen * @LastEditors: witersen
* @LastEditTime: 2022-05-08 20:59:18 * @LastEditTime: 2022-05-09 17:08:00
* @Description: QQ:1801168257 * @Description: QQ:1801168257
*/ */
@ -57,7 +57,8 @@ class Svnrep extends Base
//创建空仓库 //创建空仓库
//解决创建中文仓库乱码问题 //解决创建中文仓库乱码问题
FunShellExec('export LC_CTYPE=en_US.UTF-8 && svnadmin create ' . $this->config_svn['rep_base_path'] . $this->payload['rep_name']); $cmd = sprintf("export LC_CTYPE=en_US.UTF-8 && '%s' create " . $this->config_svn['rep_base_path'] . $this->payload['rep_name'], $this->config_bin['svnadmin']);
FunShellExec($cmd);
if ($this->payload['rep_type'] == '2') { if ($this->payload['rep_type'] == '2') {
//以指定的目录结构初始化仓库 //以指定的目录结构初始化仓库
@ -209,7 +210,7 @@ class Svnrep extends Base
$authzContent = $this->authzContent; $authzContent = $this->authzContent;
foreach ($userRepList as $key => $value) { foreach ($userRepList as $key => $value) {
$cmd = sprintf("svnlook tree '%s' --full-paths --non-recursive '%s'", $this->config_svn['rep_base_path'] . $value['repName'], $value['priPath']); $cmd = sprintf("'%s' tree '%s' --full-paths --non-recursive '%s'", $this->config_bin['svnlook'], $this->config_svn['rep_base_path'] . $value['repName'], $value['priPath']);
$result = FunShellExec($cmd); $result = FunShellExec($cmd);
if (strstr($result['error'], 'svnlook: E160013:')) { if (strstr($result['error'], 'svnlook: E160013:')) {
@ -658,7 +659,7 @@ class Svnrep extends Base
$path = $this->payload['path']; $path = $this->payload['path'];
//获取全路径的一层目录树 //获取全路径的一层目录树
$cmdSvnlookTree = sprintf("svnlook tree '%s' --full-paths --non-recursive '%s'", $this->config_svn['rep_base_path'] . $this->payload['rep_name'], $path); $cmdSvnlookTree = sprintf("'%s' tree '%s' --full-paths --non-recursive '%s'", $this->config_bin['svnlook'],$this->config_svn['rep_base_path'] . $this->payload['rep_name'], $path);
$result = FunShellExec($cmdSvnlookTree); $result = FunShellExec($cmdSvnlookTree);
$result = $result['result']; $result = $result['result'];
$resultArray = explode("\n", trim($result)); $resultArray = explode("\n", trim($result));
@ -755,7 +756,7 @@ class Svnrep extends Base
$path = $this->payload['path']; $path = $this->payload['path'];
//获取全路径的一层目录树 //获取全路径的一层目录树
$cmdSvnlookTree = sprintf("svnlook tree '%s' --full-paths --non-recursive '%s'", $this->config_svn['rep_base_path'] . $this->payload['rep_name'], $path); $cmdSvnlookTree = sprintf("'%s' tree '%s' --full-paths --non-recursive '%s'", $this->config_bin['svnlook'],$this->config_svn['rep_base_path'] . $this->payload['rep_name'], $path);
$result = FunShellExec($cmdSvnlookTree); $result = FunShellExec($cmdSvnlookTree);
$result = $result['result']; $result = $result['result'];
$resultArray = explode("\n", trim($result)); $resultArray = explode("\n", trim($result));

12
02.php/app/service/base/Base.php

@ -3,7 +3,7 @@
* @Author: witersen * @Author: witersen
* @Date: 2022-05-06 18:42:00 * @Date: 2022-05-06 18:42:00
* @LastEditors: witersen * @LastEditors: witersen
* @LastEditTime: 2022-05-07 12:11:18 * @LastEditTime: 2022-05-09 16:38:22
* @Description: QQ:1801168257 * @Description: QQ:1801168257
*/ */
@ -36,6 +36,7 @@ class Base
public $database; public $database;
//配置信息 //配置信息
public $config_bin;
private $config_routers; private $config_routers;
private $config_database; private $config_database;
public $config_version; public $config_version;
@ -65,7 +66,8 @@ class Base
global $payload; global $payload;
//配置信息 //配置信息
$this->config_routers = Config::get('router'); //路由 $this->config_bin = Config::get('bin'); //可执行文件路径
$this->config_routers = Config::get('router'); //路由
$this->config_database = Config::get('database'); //数据库配置 $this->config_database = Config::get('database'); //数据库配置
$this->config_version = Config::get('version'); //版本 $this->config_version = Config::get('version'); //版本
$this->config_update = Config::get('update'); //升级检测 $this->config_update = Config::get('update'); //升级检测
@ -139,9 +141,9 @@ class Base
/** /**
* 10、svnadmin对象 * 10、svnadmin对象
*/ */
$this->SVNAdminGroup = new Group($this->authzContent, $this->passwdContent, $this->config_svn); $this->SVNAdminGroup = new Group($this->authzContent, $this->passwdContent, $this->config_svn, $this->config_bin);
$this->SVNAdminRep = new Rep($this->authzContent, $this->passwdContent, $this->config_svn); $this->SVNAdminRep = new Rep($this->authzContent, $this->passwdContent, $this->config_svn, $this->config_bin);
$this->SVNAdminUser = new User($this->authzContent, $this->passwdContent, $this->config_svn); $this->SVNAdminUser = new User($this->authzContent, $this->passwdContent, $this->config_svn, $this->config_bin);
/** /**
* 11、检查对象 * 11、检查对象

17
02.php/app/util/SVNAdmin/Core.php

@ -3,7 +3,7 @@
* @Author: witersen * @Author: witersen
* @Date: 2022-04-27 23:19:24 * @Date: 2022-04-27 23:19:24
* @LastEditors: witersen * @LastEditors: witersen
* @LastEditTime: 2022-05-04 17:14:16 * @LastEditTime: 2022-05-09 16:36:56
* @Description: QQ:1801168257 * @Description: QQ:1801168257
* @copyright: https://github.com/witersen/ * @copyright: https://github.com/witersen/
*/ */
@ -203,13 +203,26 @@ class Core
*/ */
protected $REG_REP_INFO = "/(.*):[\S]*(.*)/m"; protected $REG_REP_INFO = "/(.*):[\S]*(.*)/m";
/**
* 配置文件svn内容
*
* @var array
*/
protected $config_svn; protected $config_svn;
/**
* 配置文件bin内容
*
* @var array
*/
protected $config_bin;
function __construct($authzFileContent, $passwdFileContent, $config_svn) function __construct($authzFileContent, $passwdFileContent, $config_svn, $config_bin)
{ {
$this->authzFileContent = $authzFileContent; $this->authzFileContent = $authzFileContent;
$this->passwdFileContent = $passwdFileContent; $this->passwdFileContent = $passwdFileContent;
$this->config_svn = $config_svn; $this->config_svn = $config_svn;
$this->config_bin = $config_bin;
} }
} }

6
02.php/app/util/SVNAdmin/Group.php

@ -3,7 +3,7 @@
* @Author: witersen * @Author: witersen
* @Date: 2022-04-27 15:55:52 * @Date: 2022-04-27 15:55:52
* @LastEditors: witersen * @LastEditors: witersen
* @LastEditTime: 2022-05-06 20:13:50 * @LastEditTime: 2022-05-09 16:37:11
* @Description: QQ:1801168257 * @Description: QQ:1801168257
* @copyright: https://github.com/witersen/ * @copyright: https://github.com/witersen/
*/ */
@ -12,9 +12,9 @@ namespace SVNAdmin\SVN;
class Group extends Core class Group extends Core
{ {
function __construct($authzFileContent, $passwdFileContent, $config_svn) function __construct($authzFileContent, $passwdFileContent, $config_svn, $config_bin)
{ {
parent::__construct($authzFileContent, $passwdFileContent, $config_svn); parent::__construct($authzFileContent, $passwdFileContent, $config_svn, $config_bin);
} }
/** /**

44
02.php/app/util/SVNAdmin/Rep.php

@ -3,7 +3,7 @@
* @Author: witersen * @Author: witersen
* @Date: 2022-04-27 15:45:45 * @Date: 2022-04-27 15:45:45
* @LastEditors: witersen * @LastEditors: witersen
* @LastEditTime: 2022-05-04 19:18:45 * @LastEditTime: 2022-05-09 16:58:20
* @Description: QQ:1801168257 * @Description: QQ:1801168257
* @copyright: https://github.com/witersen/ * @copyright: https://github.com/witersen/
*/ */
@ -12,9 +12,9 @@ namespace SVNAdmin\SVN;
class Rep extends Core class Rep extends Core
{ {
function __construct($authzFileContent, $passwdFileContent, $config_svn) function __construct($authzFileContent, $passwdFileContent, $config_svn, $config_bin)
{ {
parent::__construct($authzFileContent, $passwdFileContent, $config_svn); parent::__construct($authzFileContent, $passwdFileContent, $config_svn, $config_bin);
} }
/** /**
@ -852,7 +852,7 @@ class Rep extends Core
*/ */
function InitRepStruct($templetePath, $repPath, $initUser = 'SVNAdmin', $initPass = 'SVNAdmin', $message = 'Initial structure') function InitRepStruct($templetePath, $repPath, $initUser = 'SVNAdmin', $initPass = 'SVNAdmin', $message = 'Initial structure')
{ {
$cmd = sprintf("svn import '%s' 'file:///%s' --quiet --username '%s' --password '%s' --message '%s'", $templetePath, $repPath, $initUser, $initPass, $message); $cmd = sprintf("'%s' import '%s' 'file:///%s' --quiet --username '%s' --password '%s' --message '%s'", $this->config_bin['svn'], $templetePath, $repPath, $initUser, $initPass, $message);
FunShellExec($cmd); FunShellExec($cmd);
} }
@ -874,7 +874,7 @@ class Rep extends Core
{ {
$repPath = $this->config_svn['rep_base_path'] . $repName; $repPath = $this->config_svn['rep_base_path'] . $repName;
$svnadminInfoCmd = sprintf("svnadmin info '%s'", $repPath); $svnadminInfoCmd = sprintf("'%s' info '%s'", $this->config_bin['svnadmin'], $repPath);
$cmdResult = FunShellExec($svnadminInfoCmd); $cmdResult = FunShellExec($svnadminInfoCmd);
$cmdResult = $cmdResult['result']; $cmdResult = $cmdResult['result'];
@ -894,7 +894,7 @@ class Rep extends Core
function GetRepTree($repName) function GetRepTree($repName)
{ {
$repPath = $this->config_svn['rep_base_path'] . $repName; $repPath = $this->config_svn['rep_base_path'] . $repName;
$svnadminInfoCmd = sprintf("svnlook tree '%s'", $repPath); $svnadminInfoCmd = sprintf("'%s' tree '%s'", $this->config_bin['svnlook'], $repPath);
$cmdResult = FunShellExec($svnadminInfoCmd); $cmdResult = FunShellExec($svnadminInfoCmd);
$cmdResult = $cmdResult['result']; $cmdResult = $cmdResult['result'];
// $cmdResult = FunShellExec($svnadminInfoCmd); // $cmdResult = FunShellExec($svnadminInfoCmd);
@ -1198,20 +1198,22 @@ class Rep extends Core
/** /**
* 获取仓库的修订版本数量 * 获取仓库的修订版本数量
* svnadmin info
*/ */
function GetRepRev($repName) function GetRepRev($repName)
{ {
$cmd = sprintf("svnadmin info '%s' | grep 'Revisions' | awk '{print $2}'", $this->config_svn['rep_base_path'] . $repName); $cmd = sprintf("'%s' info '%s' | grep 'Revisions' | awk '{print $2}'", $this->config_bin['svnadmin'], $this->config_svn['rep_base_path'] . $repName);
$result = FunShellExec($cmd); $result = FunShellExec($cmd);
return (int)$result['result']; return (int)$result['result'];
} }
/** /**
* 获取仓库的属性内容(key-value的形式) * 获取仓库的属性内容(key-value的形式)
* svnadmin info
*/ */
function GetRepDetail($repName) function GetRepDetail($repName)
{ {
$cmd = sprintf("svnadmin info '%s'", $this->config_svn['rep_base_path'] . $repName); $cmd = sprintf("'%s' info '%s'", $this->config_bin['svnadmin'], $this->config_svn['rep_base_path'] . $repName);
$result = FunShellExec($cmd); $result = FunShellExec($cmd);
return $result['result']; return $result['result'];
} }
@ -1222,10 +1224,12 @@ class Rep extends Core
* 目前为默认最新版本 * 目前为默认最新版本
* *
* 根据体积大小自动调整单位 * 根据体积大小自动调整单位
*
* svnlook file
*/ */
function GetRepRevFileSize($repName, $filePath) function GetRepRevFileSize($repName, $filePath)
{ {
$cmd = sprintf("svnlook filesize '%s' '%s'", $this->config_svn['rep_base_path'] . $repName, $filePath); $cmd = sprintf("'%s' filesize '%s' '%s'", $this->config_bin['svnlook'], $this->config_svn['rep_base_path'] . $repName, $filePath);
$result = FunShellExec($cmd); $result = FunShellExec($cmd);
$size = (int)$result['result']; $size = (int)$result['result'];
return FunFormatSize($size); return FunFormatSize($size);
@ -1233,10 +1237,12 @@ class Rep extends Core
/** /**
* 获取仓库下指定文件或者文件夹的最高修订版本 * 获取仓库下指定文件或者文件夹的最高修订版本
*
* svnlook history
*/ */
function GetRepFileRev($repName, $filePath) function GetRepFileRev($repName, $filePath)
{ {
$cmd = sprintf("svnlook history --limit 1 '%s' '%s'", $this->config_svn['rep_base_path'] . $repName, $filePath); $cmd = sprintf("'%s' history --limit 1 '%s' '%s'", $this->config_bin['svnlook'], $this->config_svn['rep_base_path'] . $repName, $filePath);
$result = FunShellExec($cmd); $result = FunShellExec($cmd);
$result = $result['result']; $result = $result['result'];
$resultArray = explode("\n", $result); $resultArray = explode("\n", $result);
@ -1247,30 +1253,36 @@ class Rep extends Core
/** /**
* 获取仓库下指定文件或者文件夹的作者 * 获取仓库下指定文件或者文件夹的作者
*
* svnlook author
*/ */
function GetRepFileAuthor($repName, $rev) function GetRepFileAuthor($repName, $rev)
{ {
$cmd = sprintf("svnlook author -r %s '%s'", $rev, $this->config_svn['rep_base_path'] . $repName); $cmd = sprintf("'%s' author -r %s '%s'", $this->config_bin['svnlook'], $rev, $this->config_svn['rep_base_path'] . $repName);
$result = FunShellExec($cmd); $result = FunShellExec($cmd);
return $result['result']; return $result['result'];
} }
/** /**
* 获取仓库下指定文件或者文件夹的提交日期 * 获取仓库下指定文件或者文件夹的提交日期
*
* svnlook date
*/ */
function GetRepFileDate($repName, $rev) function GetRepFileDate($repName, $rev)
{ {
$cmd = sprintf("svnlook date -r %s '%s'", $rev, $this->config_svn['rep_base_path'] . $repName); $cmd = sprintf("'%s' date -r %s '%s'", $this->config_bin['svnlook'], $rev, $this->config_svn['rep_base_path'] . $repName);
$result = FunShellExec($cmd); $result = FunShellExec($cmd);
return $result['result']; return $result['result'];
} }
/** /**
* 获取仓库下指定文件或者文件夹的提交日志 * 获取仓库下指定文件或者文件夹的提交日志
*
* svnlook log
*/ */
function GetRepFileLog($repName, $rev) function GetRepFileLog($repName, $rev)
{ {
$cmd = sprintf("svnlook log -r %s '%s'", $rev, $this->config_svn['rep_base_path'] . $repName); $cmd = sprintf("'%s' log -r %s '%s'", $this->config_bin['svnlook'], $rev, $this->config_svn['rep_base_path'] . $repName);
$result = FunShellExec($cmd); $result = FunShellExec($cmd);
return $result['result']; return $result['result'];
} }
@ -1282,7 +1294,7 @@ class Rep extends Core
*/ */
function RepDump($repName, $backupName) function RepDump($repName, $backupName)
{ {
$cmd = sprintf('svnadmin dump %s --quiet > %s', $this->config_svn['rep_base_path'] . $repName, $this->config_svn['backup_base_path'] . $backupName); $cmd = sprintf("'%s' dump '%s' --quiet > '%s'", $this->config_bin['svnadmin'], $this->config_svn['rep_base_path'] . $repName, $this->config_svn['backup_base_path'] . $backupName);
FunShellExec($cmd); FunShellExec($cmd);
} }
@ -1300,7 +1312,7 @@ class Rep extends Core
*/ */
function RepLoad($repName, $fileName) function RepLoad($repName, $fileName)
{ {
$cmd = sprintf("svnadmin load --quiet '%s' < '%s'", $this->config_svn['rep_base_path'] . $repName, $this->config_svn['backup_base_path'] . $fileName); $cmd = sprintf("'%s' load --quiet '%s' < '%s'", $this->config_bin['svnadmin'], $this->config_svn['rep_base_path'] . $repName, $this->config_svn['backup_base_path'] . $fileName);
$result = FunShellExec($cmd); $result = FunShellExec($cmd);
return $result; return $result;
} }
@ -1310,7 +1322,7 @@ class Rep extends Core
*/ */
function CheckSvnUserPathAutzh($checkoutHost, $repName, $repPath, $svnUserName, $svnUserPass) function CheckSvnUserPathAutzh($checkoutHost, $repName, $repPath, $svnUserName, $svnUserPass)
{ {
$cmd = sprintf("svn list '%s' --username '%s' --password '%s' --no-auth-cache --non-interactive --trust-server-cert", $checkoutHost . '/' . $repName . $repPath, $svnUserName, $svnUserPass); $cmd = sprintf("'%s' list '%s' --username '%s' --password '%s' --no-auth-cache --non-interactive --trust-server-cert", $this->config_bin['svn'], $checkoutHost . '/' . $repName . $repPath, $svnUserName, $svnUserPass);
$result = FunShellExec($cmd); $result = FunShellExec($cmd);
if ($result['resultCode'] != 0) { if ($result['resultCode'] != 0) {

6
02.php/app/util/SVNAdmin/User.php

@ -3,7 +3,7 @@
* @Author: witersen * @Author: witersen
* @Date: 2022-04-27 15:57:48 * @Date: 2022-04-27 15:57:48
* @LastEditors: witersen * @LastEditors: witersen
* @LastEditTime: 2022-05-04 17:15:02 * @LastEditTime: 2022-05-09 16:37:46
* @Description: QQ:1801168257 * @Description: QQ:1801168257
* @copyright: https://github.com/witersen/ * @copyright: https://github.com/witersen/
*/ */
@ -12,9 +12,9 @@ namespace SVNAdmin\SVN;
class User extends Core class User extends Core
{ {
function __construct($authzFileContent, $passwdFileContent, $config_svn) function __construct($authzFileContent, $passwdFileContent, $config_svn, $config_bin)
{ {
parent::__construct($authzFileContent, $passwdFileContent, $config_svn); parent::__construct($authzFileContent, $passwdFileContent, $config_svn, $config_bin);
} }
/** /**

6
03.database/mysql/svnadmin.mysql.struct.sql → 03.database/mysql/svnadmin.sql

@ -28,9 +28,8 @@ CREATE TABLE `admin_users` (
`admin_user_password` varchar(45) NOT NULL COMMENT '用户密码', `admin_user_password` varchar(45) NOT NULL COMMENT '用户密码',
`admin_user_phone` char(11) DEFAULT NULL COMMENT '用户手机号', `admin_user_phone` char(11) DEFAULT NULL COMMENT '用户手机号',
`admin_user_email` varchar(45) DEFAULT NULL COMMENT '用户邮箱', `admin_user_email` varchar(45) DEFAULT NULL COMMENT '用户邮箱',
`admin_user_salt` varchar(45) NOT NULL COMMENT '盐值',
PRIMARY KEY (`admin_user_id`) PRIMARY KEY (`admin_user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='管理系统用户'; ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='管理系统用户';
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
@ -39,6 +38,7 @@ CREATE TABLE `admin_users` (
LOCK TABLES `admin_users` WRITE; LOCK TABLES `admin_users` WRITE;
/*!40000 ALTER TABLE `admin_users` DISABLE KEYS */; /*!40000 ALTER TABLE `admin_users` DISABLE KEYS */;
INSERT INTO `admin_users` VALUES (1,'admin','admin',NULL,NULL);
/*!40000 ALTER TABLE `admin_users` ENABLE KEYS */; /*!40000 ALTER TABLE `admin_users` ENABLE KEYS */;
UNLOCK TABLES; UNLOCK TABLES;
@ -270,4 +270,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2022-05-04 20:27:12 -- Dump completed on 2022-05-09 14:22:54

BIN
03.database/sqlite/svnadmin.sqlite.struct.db → 03.database/sqlite/svnadmin.db

Binary file not shown.

107
03.database/sqlite/svnadmin.sqlite.struct.sql → 03.database/sqlite/svnadmin.sql

@ -1,7 +1,7 @@
/* /*
Navicat Premium Data Transfer Navicat Premium Data Transfer
Source Server : svnadminv2.3 Source Server : svnadmin.sqlite.struct
Source Server Type : SQLite Source Server Type : SQLite
Source Server Version : 3030001 Source Server Version : 3030001
Source Schema : main Source Schema : main
@ -10,7 +10,7 @@
Target Server Version : 3030001 Target Server Version : 3030001
File Encoding : 65001 File Encoding : 65001
Date: 23/04/2022 15:03:11 Date: 09/05/2022 14:15:16
*/ */
PRAGMA foreign_keys = false; PRAGMA foreign_keys = false;
@ -24,10 +24,14 @@ CREATE TABLE "admin_users" (
"admin_user_name" TEXT(45) NOT NULL, "admin_user_name" TEXT(45) NOT NULL,
"admin_user_password" TEXT(45) NOT NULL, "admin_user_password" TEXT(45) NOT NULL,
"admin_user_phone" TEXT(11), "admin_user_phone" TEXT(11),
"admin_user_email" TEXT, "admin_user_email" TEXT
"admin_user_salt" TEXT NOT NULL
); );
-- ----------------------------
-- Records of admin_users
-- ----------------------------
INSERT INTO "admin_users" VALUES (1, 'admin', 'admin', NULL, NULL);
-- ---------------------------- -- ----------------------------
-- Table structure for black_token -- Table structure for black_token
-- ---------------------------- -- ----------------------------
@ -40,6 +44,10 @@ CREATE TABLE "black_token" (
"insert_time" TEXT(45) NOT NULL "insert_time" TEXT(45) NOT NULL
); );
-- ----------------------------
-- Records of black_token
-- ----------------------------
-- ---------------------------- -- ----------------------------
-- Table structure for logs -- Table structure for logs
-- ---------------------------- -- ----------------------------
@ -53,14 +61,24 @@ CREATE TABLE "logs" (
); );
-- ---------------------------- -- ----------------------------
-- Table structure for sqlite_sequence -- Records of logs
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS "sqlite_sequence";
CREATE TABLE "sqlite_sequence" ( -- ----------------------------
"name", -- Table structure for options
"seq" -- ----------------------------
DROP TABLE IF EXISTS "options";
CREATE TABLE "options" (
"option_id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"option_name" text NOT NULL,
"option_value" text NOT NULL,
"option_description" TEXT
); );
-- ----------------------------
-- Records of options
-- ----------------------------
-- ---------------------------- -- ----------------------------
-- Table structure for svn_groups -- Table structure for svn_groups
-- ---------------------------- -- ----------------------------
@ -73,6 +91,45 @@ CREATE TABLE "svn_groups" (
"svn_group_note" TEXT(1000) "svn_group_note" TEXT(1000)
); );
-- ----------------------------
-- Records of svn_groups
-- ----------------------------
-- ----------------------------
-- Table structure for svn_reps
-- ----------------------------
DROP TABLE IF EXISTS "svn_reps";
CREATE TABLE "svn_reps" (
"rep_id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"rep_name" TEXT(1000) NOT NULL,
"rep_size" integer,
"rep_rev" integer,
"rep_uuid" text,
"rep_note" TEXT(1000)
);
-- ----------------------------
-- Records of svn_reps
-- ----------------------------
-- ----------------------------
-- Table structure for svn_user_pri_paths
-- ----------------------------
DROP TABLE IF EXISTS "svn_user_pri_paths";
CREATE TABLE "svn_user_pri_paths" (
"svnn_user_pri_path_id" INTEGER NOT NULL,
"rep_name" TEXT NOT NULL,
"pri_path" TEXT NOT NULL,
"rep_pri" TEXT,
"svn_user_name" TEXT NOT NULL,
"unique" TEXT NOT NULL,
PRIMARY KEY ("svnn_user_pri_path_id")
);
-- ----------------------------
-- Records of svn_user_pri_paths
-- ----------------------------
-- ---------------------------- -- ----------------------------
-- Table structure for svn_users -- Table structure for svn_users
-- ---------------------------- -- ----------------------------
@ -85,6 +142,10 @@ CREATE TABLE "svn_users" (
"svn_user_note" TEXT(1000) "svn_user_note" TEXT(1000)
); );
-- ----------------------------
-- Records of svn_users
-- ----------------------------
-- ---------------------------- -- ----------------------------
-- Table structure for verification_code -- Table structure for verification_code
-- ---------------------------- -- ----------------------------
@ -99,16 +160,26 @@ CREATE TABLE "verification_code" (
); );
-- ---------------------------- -- ----------------------------
-- Table structure for svn_reps -- Records of verification_code
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS "svn_reps";
CREATE TABLE "svn_reps" ( -- ----------------------------
"rep_id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, -- Table structure for sqlite_sequence
"rep_name" TEXT(1000) NOT NULL, -- ----------------------------
"rep_size" integer, DROP TABLE IF EXISTS "sqlite_sequence";
"rep_rev" integer, CREATE TABLE "sqlite_sequence" (
"rep_uuid" text, "name",
"rep_note" TEXT(1000) "seq"
); );
-- ----------------------------
-- Records of sqlite_sequence
-- ----------------------------
INSERT INTO "sqlite_sequence" VALUES ('admin_users', 1);
-- ----------------------------
-- Auto increment value for admin_users
-- ----------------------------
UPDATE "sqlite_sequence" SET seq = 1 WHERE name = 'admin_users';
PRAGMA foreign_keys = true; PRAGMA foreign_keys = true;
Loading…
Cancel
Save