diff --git a/influence/docker-compose.yml b/influence/docker-compose.yml index 66ad864..740c25d 100644 --- a/influence/docker-compose.yml +++ b/influence/docker-compose.yml @@ -18,4 +18,8 @@ services: ports: - "1025:1025" # SMTP server - "8025:8025" # Web UI - restart: unless-stopped \ No newline at end of file + restart: unless-stopped + +networks: + changemaker-lite: + external: true \ No newline at end of file diff --git a/influence/scripts/build-nocodb.sh b/influence/scripts/build-nocodb.sh index f1d42da..d437b92 100755 --- a/influence/scripts/build-nocodb.sh +++ b/influence/scripts/build-nocodb.sh @@ -415,12 +415,22 @@ import_table_data() { print_status "Progress: $import_count/$total_records records processed for $table_name" fi - # Remove auto-generated fields that might cause conflicts + # Remove auto-generated and system columns that can cause conflicts local cleaned_record - cleaned_record=$(echo "$record" | jq 'del(.Id, .CreatedAt, .UpdatedAt, .id, .created_at, .updated_at)' 2>/dev/null) + cleaned_record=$(echo "$record" | jq ' + del(.Id) | + del(.id) | + del(.ID) | + del(.CreatedAt) | + del(.UpdatedAt) | + del(.created_at) | + del(.updated_at) | + del(.ncRecordId) | + del(.ncRecordHash) + ' 2>/dev/null) - if [[ -z "$cleaned_record" || "$cleaned_record" == "null" ]]; then - print_warning "Skipping invalid record $import_count in $table_name" + if [[ -z "$cleaned_record" || "$cleaned_record" == "{}" || "$cleaned_record" == "null" ]]; then + print_warning "Skipping empty record $import_count in $table_name" continue fi @@ -827,7 +837,10 @@ create_email_logs_table() { { "column_name": "id", "title": "ID", - "uidt": "ID" + "uidt": "ID", + "pk": true, + "ai": true, + "rqd": true }, { "column_name": "recipient_email", @@ -973,7 +986,10 @@ create_campaigns_table() { { "column_name": "id", "title": "ID", - "uidt": "ID" + "uidt": "ID", + "pk": true, + "ai": true, + "rqd": true }, { "column_name": "slug", @@ -1112,8 +1128,11 @@ create_campaign_emails_table() { "columns": [ { "column_name": "id", - "title": "ID", - "uidt": "ID" + "title": "ID", + "uidt": "ID", + "pk": true, + "ai": true, + "rqd": true }, { "column_name": "campaign_id", @@ -1234,7 +1253,10 @@ create_call_logs_table() { { "column_name": "id", "title": "ID", - "uidt": "ID" + "uidt": "ID", + "pk": true, + "ai": true, + "rqd": true }, { "column_name": "representative_name",