浏览代码

创建数据库sql

admin 1 年之前
父节点
当前提交
e2fb09108e
共有 3 个文件被更改,包括 34 次插入2 次删除
  1. 1 1
      .idea/misc.xml
  2. 1 1
      .idea/short_url.iml
  3. 32 0
      short_url.sql

+ 1 - 1
.idea/misc.xml

@@ -3,7 +3,7 @@
   <component name="Black">
     <option name="sdkName" value="Python 3.12 (python)" />
   </component>
-  <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.12 (python)" project-jdk-type="Python SDK" />
+  <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.11" project-jdk-type="Python SDK" />
   <component name="PyPackaging">
     <option name="earlyReleasesAsUpgrades" value="true" />
   </component>

+ 1 - 1
.idea/short_url.iml

@@ -5,7 +5,7 @@
   </component>
   <component name="NewModuleRootManager">
     <content url="file://$MODULE_DIR$" />
-    <orderEntry type="jdk" jdkName="Python 3.12 (python)" jdkType="Python SDK" />
+    <orderEntry type="jdk" jdkName="Python 3.11" jdkType="Python SDK" />
     <orderEntry type="sourceFolder" forTests="false" />
   </component>
   <component name="TemplatesService">

+ 32 - 0
short_url.sql

@@ -0,0 +1,32 @@
+/*
+ Navicat Premium Data Transfer
+
+ Source Server         : 服务器
+ Source Server Type    : MySQL
+ Source Server Version : 80100 (8.1.0)
+ Source Host           : 1.94.45.147:3306
+ Source Schema         : short_url
+
+ Target Server Type    : MySQL
+ Target Server Version : 80100 (8.1.0)
+ File Encoding         : 65001
+
+ Date: 13/01/2024 19:35:16
+*/
+
+SET NAMES utf8mb4;
+SET FOREIGN_KEY_CHECKS = 0;
+
+-- ----------------------------
+-- Table structure for urls
+-- ----------------------------
+DROP TABLE IF EXISTS `urls`;
+CREATE TABLE `urls` (
+  `id` int NOT NULL AUTO_INCREMENT,
+  `original_url` varchar(255) DEFAULT NULL,
+  `short_url` varchar(255) DEFAULT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `short_url_unique` (`short_url`)
+) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+SET FOREIGN_KEY_CHECKS = 1;