[sql] DROP TABLE IF EXISTS `content`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `content` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `uid` int(10) unsigned NOT NULL, `pid` int(10) unsigned DEFAULT NULL, `type` varchar(32) NOT NULL, `title` varchar(128) NOT NULL, PRIMARY KEY (`id`), KEY `FK__pid_id` (`pid`), KEY `FK__uid_uid` (`uid`), CONSTRAINT `FK__pid_id` FOREIGN KEY (`pid`) REFERENCES `content` (`id`) ON DELETE CASCADE, CONSTRAINT `FK__uid_uid` FOREIGN KEY (`uid`) REFERENCES `users` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `content` -- LOCK TABLES `content` WRITE; /*!40000 ALTER TABLE `content` DISABLE KEYS */; INSERT INTO `content` VALUES (1,1,NULL,'gallery','aaaaa'),(2,1,1,'album','aaaaa'),(3,1,1,'album','aaaaa'); /*!40000 ALTER TABLE `content` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `contentprop` -- DROP TABLE IF EXISTS `contentprop`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `contentprop` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `cid` int(10) unsigned NOT NULL, `name` varchar(100) NOT NULL, `value` longtext, PRIMARY KEY (`id`), KEY `FK__cid_id` (`cid`), CONSTRAINT `FK__cid_id` FOREIGN KEY (`cid`) REFERENCES `content` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `contentprop` -- LOCK TABLES `contentprop` WRITE; /*!40000 ALTER TABLE `contentprop` DISABLE KEYS */; INSERT INTO `contentprop` VALUES (1,1,'theme','standard'),(2,1,'skin','standard.png'),(3,2,'album_type','flickr'),(4,3,'album_type','custom'); /*!40000 ALTER TABLE `contentprop` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `systemprop` -- DROP TABLE IF EXISTS `systemprop`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `systemprop` ( `name` varchar(100) NOT NULL, `value` longtext, www.2cto.com PRIMARY KEY (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `systemprop` -- LOCK TABLES `systemprop` WRITE; /*!40000 ALTER TABLE `systemprop` DISABLE KEYS */; INSERT INTO `systemprop` VALUES ('flickr_api_key','dc123ae6ab78886c452b7ad44ec171c6'); /*!40000 ALTER TABLE `systemprop` ENABLE KEYS */; UNLOCK TABLES;
|