Updates to the 'simple' example.

pull/7/head
Ferry Boender 10 years ago
parent 1351816935
commit 44e7d69444
  1. 7
      examples/simple/job_import.sh
  2. 6
      examples/simple/simple.json

@ -1,7 +1,10 @@
#!/bin/sh #!/bin/sh
MYSQL_DEFAULTS_FILE="my.cnf" MYSQL_DEFAULTS_FILE="my.cnf"
MYSQL="mysql --defaults-file=$MYSQL_DEFAULTS_FILE" MYSQL="mysql --defaults-file=$MYSQL_DEFAULTS_FILE"
echo "echo 'DROP DATABASE scriptform_acc' | $MYSQL" echo "This is what would be executed if this wasn't a fake script:"
echo "$MYSQL < dbs/${sample_db}.sql" echo
echo "echo 'DROP DATABASE $target_db' | $MYSQL"
echo "$MYSQL ${target_db} < ${sql_file}"

@ -3,7 +3,7 @@
"forms": { "forms": {
"import": { "import": {
"title": "Import data", "title": "Import data",
"description": "Import CSV data into a database", "description": "Import SQL into a database",
"submit_title": "Import", "submit_title": "Import",
"script": "job_import.sh", "script": "job_import.sh",
"fields": [ "fields": [
@ -17,8 +17,8 @@
] ]
}, },
{ {
"name": "csv_file", "name": "sql_file",
"title": "CSV file", "title": "SQL file",
"type": "file" "type": "file"
} }
] ]

Loading…
Cancel
Save