瀏覽代碼

create tables

andre 9 月之前
父節點
當前提交
bbb16b98d0
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      siteBuilder.php

+ 8 - 0
siteBuilder.php

@@ -1168,6 +1168,7 @@ function getSiteBuilderApiURL($params) {
 
 
 function siteBuilderCreateTables() {
 function siteBuilderCreateTables() {
 	// Create a new table.
 	// Create a new table.
+	try {
 		Capsule::schema()->create(
 		Capsule::schema()->create(
 			'sitePro_acc',
 			'sitePro_acc',
 			function ($table) {
 			function ($table) {
@@ -1178,6 +1179,10 @@ function siteBuilderCreateTables() {
 				$table->boolean('enabled');
 				$table->boolean('enabled');
 			}
 			}
 		);
 		);
+	} catch (\Exception $e) {
+		echo "Unable to create sitePro_acc: {$e->getMessage()}";
+	}
+	try {
 		Capsule::schema()->create(
 		Capsule::schema()->create(
 			'sitePro_dom',
 			'sitePro_dom',
 			function ($table) {
 			function ($table) {
@@ -1188,4 +1193,7 @@ function siteBuilderCreateTables() {
 				$table->boolean('enabled');
 				$table->boolean('enabled');
 			}
 			}
 		);
 		);
+	} catch (\Exception $e) {
+		echo "Unable to create sitePro_dom: {$e->getMessage()}";
+	}
 }
 }