Fixed some database errors and included influence in the network for changemaker

This commit is contained in:
admin 2025-10-09 09:46:45 -06:00
parent 607062d365
commit 7cc6100e9b
2 changed files with 36 additions and 10 deletions

View File

@ -18,4 +18,8 @@ services:
ports: ports:
- "1025:1025" # SMTP server - "1025:1025" # SMTP server
- "8025:8025" # Web UI - "8025:8025" # Web UI
restart: unless-stopped restart: unless-stopped
networks:
changemaker-lite:
external: true

View File

@ -415,12 +415,22 @@ import_table_data() {
print_status "Progress: $import_count/$total_records records processed for $table_name" print_status "Progress: $import_count/$total_records records processed for $table_name"
fi fi
# Remove auto-generated fields that might cause conflicts # Remove auto-generated and system columns that can cause conflicts
local cleaned_record 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 if [[ -z "$cleaned_record" || "$cleaned_record" == "{}" || "$cleaned_record" == "null" ]]; then
print_warning "Skipping invalid record $import_count in $table_name" print_warning "Skipping empty record $import_count in $table_name"
continue continue
fi fi
@ -827,7 +837,10 @@ create_email_logs_table() {
{ {
"column_name": "id", "column_name": "id",
"title": "ID", "title": "ID",
"uidt": "ID" "uidt": "ID",
"pk": true,
"ai": true,
"rqd": true
}, },
{ {
"column_name": "recipient_email", "column_name": "recipient_email",
@ -973,7 +986,10 @@ create_campaigns_table() {
{ {
"column_name": "id", "column_name": "id",
"title": "ID", "title": "ID",
"uidt": "ID" "uidt": "ID",
"pk": true,
"ai": true,
"rqd": true
}, },
{ {
"column_name": "slug", "column_name": "slug",
@ -1112,8 +1128,11 @@ create_campaign_emails_table() {
"columns": [ "columns": [
{ {
"column_name": "id", "column_name": "id",
"title": "ID", "title": "ID",
"uidt": "ID" "uidt": "ID",
"pk": true,
"ai": true,
"rqd": true
}, },
{ {
"column_name": "campaign_id", "column_name": "campaign_id",
@ -1234,7 +1253,10 @@ create_call_logs_table() {
{ {
"column_name": "id", "column_name": "id",
"title": "ID", "title": "ID",
"uidt": "ID" "uidt": "ID",
"pk": true,
"ai": true,
"rqd": true
}, },
{ {
"column_name": "representative_name", "column_name": "representative_name",