MCPcopy Create free account
hub / github.com/asternic/wuzapi / createTableIfNotExistsSQLite

Function createTableIfNotExistsSQLite

migrations.go:500–514  ·  view source on GitHub ↗
(tx *sqlx.Tx, tableName, createSQL string)

Source from the content-addressed store, hash-verified

498 } else if migration.ID == 6 {
499 if db.DriverName() == "sqlite" {
500 // Add quoted_message_id column to message_history table for SQLite
501 err = addColumnIfNotExistsSQLite(tx, "message_history", "quoted_message_id", "TEXT")
502 } else {
503 _, err = tx.Exec(migration.UpSQL)
504 }
505 } else if migration.ID == 7 {
506 if db.DriverName() == "sqlite" {
507 // Add hmac_key column as BLOB for encrypted data in SQLite
508 err = addColumnIfNotExistsSQLite(tx, "users", "hmac_key", "BLOB")
509 } else {
510 _, err = tx.Exec(migration.UpSQL)
511 }
512 } else if migration.ID == 8 {
513 if db.DriverName() == "sqlite" {
514 // Add dataJson column to message_history table for SQLite
515 err = addColumnIfNotExistsSQLite(tx, "message_history", "datajson", "TEXT")
516 } else {
517 _, err = tx.Exec(migration.UpSQL)

Callers 1

applyMigrationFunction · 0.85

Calls 1

GetMethod · 0.80

Tested by

no test coverage detected