Fixed some database errors and included influence in the network for changemaker
This commit is contained in:
parent
607062d365
commit
7cc6100e9b
@ -18,4 +18,8 @@ services:
|
||||
ports:
|
||||
- "1025:1025" # SMTP server
|
||||
- "8025:8025" # Web UI
|
||||
restart: unless-stopped
|
||||
restart: unless-stopped
|
||||
|
||||
networks:
|
||||
changemaker-lite:
|
||||
external: true
|
||||
@ -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",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user