初始化数据库脚本优化

This commit is contained in:
thinkgem
2020-09-14 23:01:18 +08:00
parent 9daef68787
commit df98f266b9
8 changed files with 4 additions and 52 deletions

View File

@@ -1,12 +1,4 @@
/* Drop Tables */
DROP TABLE test_data;
DROP TABLE test_data_child;
DROP TABLE test_tree;
/* Create Tables */

View File

@@ -1,12 +1,4 @@
/* Drop Tables */
IF OBJECT_ID('[test_data]') IS NOT NULL DROP TABLE [test_data];
IF OBJECT_ID('[test_data_child]') IS NOT NULL DROP TABLE [test_data_child];
IF OBJECT_ID('[test_tree]') IS NOT NULL DROP TABLE [test_tree];
/* Create Tables */

View File

@@ -1,13 +1,5 @@
SET SESSION FOREIGN_KEY_CHECKS=0;
/* Drop Tables */
DROP TABLE IF EXISTS test_data;
DROP TABLE IF EXISTS test_data_child;
DROP TABLE IF EXISTS test_tree;
/* Create Tables */

View File

@@ -1,12 +1,4 @@
/* Drop Tables */
DROP TABLE test_data CASCADE CONSTRAINTS;
DROP TABLE test_data_child CASCADE CONSTRAINTS;
DROP TABLE test_tree CASCADE CONSTRAINTS;
/* Create Tables */

View File

@@ -1,12 +1,4 @@
/* Drop Tables */
DROP TABLE IF EXISTS test_data;
DROP TABLE IF EXISTS test_data_child;
DROP TABLE IF EXISTS test_tree;
/* Create Tables */