summaryrefslogtreecommitdiff
path: root/lib/input
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-06-27 18:59:21 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2021-06-27 18:59:21 +0100
commitd74a7b7aec40d83b940dbfe10850734075aa6c5c (patch)
treeb1e0050b6265b068956ae7d417e1d5d8baf7a985 /lib/input
parentBasic type mapper (diff)
downloadmygrate-d74a7b7aec40d83b940dbfe10850734075aa6c5c.tar.bz2
mygrate-d74a7b7aec40d83b940dbfe10850734075aa6c5c.tar.xz
mygrate-d74a7b7aec40d83b940dbfe10850734075aa6c5c.zip
Add an existing table to the config
Diffstat (limited to 'lib/input')
-rw-r--r--lib/input/sql/selectColumns.sql5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/input/sql/selectColumns.sql b/lib/input/sql/selectColumns.sql
new file mode 100644
index 0000000..a8a224c
--- /dev/null
+++ b/lib/input/sql/selectColumns.sql
@@ -0,0 +1,5 @@
+SELECT column_name, is_nullable = 'YES', column_type, column_key = 'PRI'
+FROM information_schema.columns
+WHERE table_schema = DATABASE()
+AND table_name = ?
+ORDER BY ordinal_position