]> jfr.im git - z_archive/KronOS.git/commitdiff
Updated SQL to prepare for apps
authorJohn Runyon <redacted>
Thu, 11 Oct 2012 08:22:10 +0000 (11:22 +0300)
committerJohn Runyon <redacted>
Thu, 11 Oct 2012 08:22:10 +0000 (11:22 +0300)
README.md
dump.sql

index 7738c0aa72e5a9b9ad3218efd593a4d99f3a2e6a..2dba468cb4717d64807924cc9b39449463e56c0a 100644 (file)
--- a/README.md
+++ b/README.md
@@ -12,5 +12,6 @@ Installing
 1. Download, unpack, bla.
 1. Import dump.sql into a MySQL db.
 1. Rename config.php.sample -> config.php and edit.
+1. Insert initial users into the DB.
+   Prepend the PW_SALT (from config.php) to the password, then SHA1.
 1. Set up a webserver for the frontend/ dir
-1. Default username/password is test/test
index 381cb49ca96dfb944f590e6cab384c543489c718..1d2b5cf55c6eaa91ac4e3350feea5e6f3a90624d 100644 (file)
--- a/dump.sql
+++ b/dump.sql
 /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
 /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
 
+--
+-- Table structure for table `apps`
+--
+
+DROP TABLE IF EXISTS `apps`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `apps` (
+  `aid` int(10) unsigned NOT NULL AUTO_INCREMENT,
+  `appname` varchar(100) NOT NULL,
+  `parent` int(10) unsigned NOT NULL,
+  `filename` varchar(100) NOT NULL,
+  `access` enum('user','operator','manager') NOT NULL DEFAULT 'user',
+  PRIMARY KEY (`aid`),
+  UNIQUE KEY `appname` (`appname`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `apps`
+--
+
+LOCK TABLES `apps` WRITE;
+/*!40000 ALTER TABLE `apps` DISABLE KEYS */;
+/*!40000 ALTER TABLE `apps` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `categories`
+--
+
+DROP TABLE IF EXISTS `categories`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `categories` (
+  `cid` int(10) unsigned NOT NULL AUTO_INCREMENT,
+  `catname` varchar(100) NOT NULL,
+  PRIMARY KEY (`cid`),
+  UNIQUE KEY `catname` (`catname`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `categories`
+--
+
+LOCK TABLES `categories` WRITE;
+/*!40000 ALTER TABLE `categories` DISABLE KEYS */;
+/*!40000 ALTER TABLE `categories` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `session_apps`
+--
+
+DROP TABLE IF EXISTS `session_apps`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `session_apps` (
+  `iid` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
+  `sid` int(10) unsigned NOT NULL,
+  `aid` int(10) unsigned NOT NULL,
+  PRIMARY KEY (`iid`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `session_apps`
+--
+
+LOCK TABLES `session_apps` WRITE;
+/*!40000 ALTER TABLE `session_apps` DISABLE KEYS */;
+/*!40000 ALTER TABLE `session_apps` ENABLE KEYS */;
+UNLOCK TABLES;
+
 --
 -- Table structure for table `sessions`
 --
@@ -52,9 +127,10 @@ CREATE TABLE `users` (
   `uid` int(10) unsigned NOT NULL AUTO_INCREMENT,
   `username` varchar(15) NOT NULL,
   `password` char(40) NOT NULL,
-  `displayname` varchar(100) NOT NULL DEFAULT 'User',
+  `displayname` varchar(100) NOT NULL,
+  `access` enum('user','operator','manager') NOT NULL DEFAULT 'user',
   PRIMARY KEY (`uid`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 /*!40101 SET character_set_client = @saved_cs_client */;
 
 --
@@ -63,7 +139,6 @@ CREATE TABLE `users` (
 
 LOCK TABLES `users` WRITE;
 /*!40000 ALTER TABLE `users` DISABLE KEYS */;
-INSERT INTO `users` VALUES (1,'test','ea5c3b22864158b00a6e41f9d481ea0cf90e9e91','Testuser');
 /*!40000 ALTER TABLE `users` ENABLE KEYS */;
 UNLOCK TABLES;
 /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -76,4 +151,4 @@ UNLOCK TABLES;
 /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
 /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
 
--- Dump completed on 2012-10-11  8:51:43
+-- Dump completed on 2012-10-11 11:19:30