From: Hamatoma Date: Fri, 4 Feb 2022 23:51:14 +0000 (+0100) Subject: Configuration data, new CreateInitialSql X-Git-Url: https://gitweb.hamatoma.de/?a=commitdiff_plain;h=HEAD;p=exhibition.git Configuration data, new CreateInitialSql --- diff --git a/lib/setting/installation.dart b/lib/setting/installation.dart index 5242eaa..904ec0d 100644 --- a/lib/setting/installation.dart +++ b/lib/setting/installation.dart @@ -68,16 +68,16 @@ class Installation { "form.gap.field_button.height": "16.0", "productive": { "version": "1.0", - "host": "localhost", - "port": 6000, - "scheme": "http", + "host": "famical.hamatoma.de", + "port": 443, + "scheme": "https", "timeout": 10 }, "development": { "version": "1.0", - "host": "pollsam.hamatoma.de", - "port": 443, - "scheme": "https", + "host": "localhost", + "port": 80, + "scheme": "http", "timeout": 10 }, "configDirectory": "${home.path}", diff --git a/pubspec.yaml b/pubspec.yaml index 99dcd4f..248037c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -66,6 +66,8 @@ flutter: # included with your application, so that you can use the icons in # the material Icons class. uses-material-design: true + assets: + - assets/ # To add assets to your application, add an assets section, like this: # assets: @@ -97,3 +99,4 @@ flutter: # # For details regarding fonts from package dependencies, # see https://flutter.dev/custom-fonts/#from-packages + diff --git a/tools/CreateInitialSql b/tools/CreateInitialSql new file mode 100755 index 0000000..1b33145 --- /dev/null +++ b/tools/CreateInitialSql @@ -0,0 +1,43 @@ +#! /bin/bash +BASE=lib/meta +function Create(){ + local base=$1 + local back=$2 + cd $base + local modules= + for file in *; do + if [ $file != 'modules.dart' -a $file != 'module_meta_data.dart' ]; then + local module=${file/_meta.dart/} + modules="$modules $module" + fi + done + cd $back + local fileSql=/tmp/rest_server.init.sql + echo "-- created from CreateInitialSql, $(date '+%Y.%m.%d %H:%M')" >$fileSql + for module in $modules; do + module2=$(echo ${module:0:1} | tr a-z A-Z)${module:1} + echo "== $module2" + ./Meta show-table $module2 >>$fileSql + done + cat <>$fileSql +insert into roles (role_id, role_name, role_createdat, role_createdby) values + (10, 'Administrator', NOW(), 'install'), + (20, 'Verwalter', NOW(), 'install'), + (30, 'Benutzer', NOW(), 'install'), + (90, 'Gast', NOW(), 'install'); +insert into users (user_id, user_name, user_displayname, user_email, user_role, user_createdat, user_createdby) values + (1, 'Administrator', 'Admin', 'admin@hamatoma.de', 10, NOW(), 'install'), + (2, 'Hamatoma', 'Hamatoma', 'hm@hamatoma.de', 10, NOW(), 'install'); +insert into starters (starter_id, starter_name, starter_route, starter_icon, starter_createdat, starter_createdby) values + (1, 'roles', 'roles/list', '', NOW(), 'install'), + (2, 'users', 'users/list', '', NOW(), 'install'), + (3, 'structures', 'structures/list', '', NOW(), 'install'), + (4, 'benchmark', 'benchmark/list', '', NOW(), 'install'); +EOS + ls -ld $fileSql +} +if [ ! -d $BASE ]; then + echo "+++ wrong current dir: missing lib/meta" +else + Create $BASE "../.." +fi \ No newline at end of file