diff --git a/.gitignore b/.gitignore index 6bd94b5..746b147 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -core/app/ \ No newline at end of file +core/app/ +schema/* +!schema/.gitkeep \ No newline at end of file diff --git a/core/relations.php b/core/relations.php index e349794..29b1c2d 100644 --- a/core/relations.php +++ b/core/relations.php @@ -246,7 +246,9 @@
On this page you can add new or delete existing table relations i.e. foreign keys. Having foreign keys will result in Cruddiy forms with cascading deletes/updates and dropdown fields populated by foreign keys. If it is not clear what you want or need to do here, it is SAFER to skip this step and move to the next step! You can always come back later and regenerate new forms.
-
+ + + Import Schema or Dump
diff --git a/core/schema.php b/core/schema.php new file mode 100644 index 0000000..0a4c66e --- /dev/null +++ b/core/schema.php @@ -0,0 +1,140 @@ +getMessage(); + } + + // Check for any errors that occurred after the last executed query + if ($error = mysqli_error($link)) { + $errors['schema'][] = $error; + } + + mysqli_close($link); + + if (!isset($errors['schema'])) { + header('location:relations.php'); + exit(); + } +} +?> + + + + + CRUD generator + + + + +
+
+
+
+
+

Import schema

+ + + + + + + + +
+ + +
+ + + + Place your .sql files in the schema/ folder in the project root. + +
+ + +
+ + +
+ +
+ > + +
+
+ +
+
+
+
+
+
+
+ + + + + + + diff --git a/schema/.gitkeep b/schema/.gitkeep new file mode 100644 index 0000000..e69de29