diff --git a/driver/driver_test.go b/driver/driver_test.go index 9cfcea7..1b92f74 100644 --- a/driver/driver_test.go +++ b/driver/driver_test.go @@ -153,7 +153,7 @@ func Test_BeginTx(t *testing.T) { t.Fatal(err) } - _, err = tx1.Exec(`CREATE TABLE IF NOT EXISTS test (col)`) + _, err = tx1.Exec(`CREATE TABLE test (col)`) if err == nil { t.Error("want error") } @@ -310,7 +310,7 @@ func Test_time(t *testing.T) { twosday := time.Date(2022, 2, 22, 22, 22, 22, 0, time.UTC) - _, err = db.Exec(`CREATE TABLE IF NOT EXISTS test (at DATETIME)`) + _, err = db.Exec(`CREATE TABLE test (at DATETIME)`) if err != nil { t.Fatal(err) } diff --git a/driver/json_test.go b/driver/json_test.go index f6a4a8b..e1cce5f 100644 --- a/driver/json_test.go +++ b/driver/json_test.go @@ -18,7 +18,7 @@ func Example_json() { defer db.Close() _, err = db.Exec(` - CREATE TABLE IF NOT EXISTS orders ( + CREATE TABLE orders ( cart_id INTEGER PRIMARY KEY, user_id INTEGER NOT NULL, cart TEXT diff --git a/driver/savepoint_test.go b/driver/savepoint_test.go index 200ab88..a95cb35 100644 --- a/driver/savepoint_test.go +++ b/driver/savepoint_test.go @@ -16,7 +16,7 @@ func ExampleSavepoint() { } defer db.Close() - _, err = db.Exec(`CREATE TABLE IF NOT EXISTS users (id INT, name VARCHAR(10))`) + _, err = db.Exec(`CREATE TABLE users (id INT, name VARCHAR(10))`) if err != nil { log.Fatal(err) } diff --git a/example_test.go b/example_test.go index c0fa9fa..d1317bb 100644 --- a/example_test.go +++ b/example_test.go @@ -16,7 +16,7 @@ func Example() { log.Fatal(err) } - err = db.Exec(`CREATE TABLE IF NOT EXISTS users (id INT, name VARCHAR(10))`) + err = db.Exec(`CREATE TABLE users (id INT, name VARCHAR(10))`) if err != nil { log.Fatal(err) } diff --git a/ext/blobio/blob_test.go b/ext/blobio/blob_test.go index 73edd4c..c7928ee 100644 --- a/ext/blobio/blob_test.go +++ b/ext/blobio/blob_test.go @@ -27,7 +27,7 @@ func Example() { } defer db.Close() - _, err = db.Exec(`CREATE TABLE IF NOT EXISTS test (col)`) + _, err = db.Exec(`CREATE TABLE test (col)`) if err != nil { log.Fatal(err) } @@ -79,8 +79,8 @@ func Test_readblob(t *testing.T) { } err = db.Exec(` - CREATE TABLE IF NOT EXISTS test1 (col); - CREATE TABLE IF NOT EXISTS test2 (col); + CREATE TABLE test1 (col); + CREATE TABLE test2 (col); INSERT INTO test1 VALUES (x'cafe'); INSERT INTO test2 VALUES (x'babe'); `) @@ -139,8 +139,8 @@ func Test_openblob(t *testing.T) { } err = db.Exec(` - CREATE TABLE IF NOT EXISTS test1 (col); - CREATE TABLE IF NOT EXISTS test2 (col); + CREATE TABLE test1 (col); + CREATE TABLE test2 (col); INSERT INTO test1 VALUES (x'cafe'); INSERT INTO test2 VALUES (x'babe'); `) diff --git a/ext/csv/csv_test.go b/ext/csv/csv_test.go index 7ecdab2..21fe3ed 100644 --- a/ext/csv/csv_test.go +++ b/ext/csv/csv_test.go @@ -20,7 +20,7 @@ func Example() { csv.Register(db) err = db.Exec(` - CREATE VIRTUAL TABLE IF NOT EXISTS eurofxref USING csv( + CREATE VIRTUAL TABLE eurofxref USING csv( filename = 'testdata/eurofxref.csv', header = YES, columns = 42, diff --git a/ext/stats/stats_test.go b/ext/stats/stats_test.go index 411f1da..54b183e 100644 --- a/ext/stats/stats_test.go +++ b/ext/stats/stats_test.go @@ -20,7 +20,7 @@ func TestRegister_variance(t *testing.T) { stats.Register(db) - err = db.Exec(`CREATE TABLE IF NOT EXISTS data (x)`) + err = db.Exec(`CREATE TABLE data (x)`) if err != nil { t.Fatal(err) } @@ -92,7 +92,7 @@ func TestRegister_covariance(t *testing.T) { stats.Register(db) - err = db.Exec(`CREATE TABLE IF NOT EXISTS data (y, x)`) + err = db.Exec(`CREATE TABLE data (y, x)`) if err != nil { t.Fatal(err) } diff --git a/ext/unicode/unicode_test.go b/ext/unicode/unicode_test.go index 123d247..fa41cd6 100644 --- a/ext/unicode/unicode_test.go +++ b/ext/unicode/unicode_test.go @@ -81,7 +81,7 @@ func TestRegister_collation(t *testing.T) { Register(db) - err = db.Exec(`CREATE TABLE IF NOT EXISTS words (word VARCHAR(10))`) + err = db.Exec(`CREATE TABLE words (word VARCHAR(10))`) if err != nil { t.Fatal(err) } diff --git a/func_test.go b/func_test.go index 12a41a5..03b0fdd 100644 --- a/func_test.go +++ b/func_test.go @@ -18,7 +18,7 @@ func ExampleConn_CreateCollation() { } defer db.Close() - err = db.Exec(`CREATE TABLE IF NOT EXISTS words (word VARCHAR(10))`) + err = db.Exec(`CREATE TABLE words (word VARCHAR(10))`) if err != nil { log.Fatal(err) } @@ -66,7 +66,7 @@ func ExampleConn_CreateFunction() { } defer db.Close() - err = db.Exec(`CREATE TABLE IF NOT EXISTS words (word VARCHAR(10))`) + err = db.Exec(`CREATE TABLE words (word VARCHAR(10))`) if err != nil { log.Fatal(err) } @@ -111,7 +111,7 @@ func ExampleContext_SetAuxData() { } defer db.Close() - err = db.Exec(`CREATE TABLE IF NOT EXISTS words (word VARCHAR(10))`) + err = db.Exec(`CREATE TABLE words (word VARCHAR(10))`) if err != nil { log.Fatal(err) } diff --git a/func_win_test.go b/func_win_test.go index bbe2e19..4117748 100644 --- a/func_win_test.go +++ b/func_win_test.go @@ -16,7 +16,7 @@ func ExampleConn_CreateWindowFunction() { } defer db.Close() - err = db.Exec(`CREATE TABLE IF NOT EXISTS words (word VARCHAR(10))`) + err = db.Exec(`CREATE TABLE words (word VARCHAR(10))`) if err != nil { log.Fatal(err) } diff --git a/tests/backup_test.go b/tests/backup_test.go index 1d3d0a8..121a8a9 100644 --- a/tests/backup_test.go +++ b/tests/backup_test.go @@ -20,7 +20,7 @@ func TestBackup(t *testing.T) { } defer db.Close() - err = db.Exec(`CREATE TABLE IF NOT EXISTS users (id INT, name VARCHAR(10))`) + err = db.Exec(`CREATE TABLE users (id INT, name VARCHAR(10))`) if err != nil { t.Fatal(err) } diff --git a/tests/blob_test.go b/tests/blob_test.go index 62b77b7..4b181f8 100644 --- a/tests/blob_test.go +++ b/tests/blob_test.go @@ -22,7 +22,7 @@ func TestBlob(t *testing.T) { } defer db.Close() - err = db.Exec(`CREATE TABLE IF NOT EXISTS test (col)`) + err = db.Exec(`CREATE TABLE test (col)`) if err != nil { t.Fatal(err) } @@ -97,7 +97,7 @@ func TestBlob_large(t *testing.T) { } defer db.Close() - err = db.Exec(`CREATE TABLE IF NOT EXISTS test (col)`) + err = db.Exec(`CREATE TABLE test (col)`) if err != nil { t.Fatal(err) } @@ -158,7 +158,7 @@ func TestBlob_overflow(t *testing.T) { } defer db.Close() - err = db.Exec(`CREATE TABLE IF NOT EXISTS test (col)`) + err = db.Exec(`CREATE TABLE test (col)`) if err != nil { t.Fatal(err) } @@ -217,7 +217,7 @@ func TestBlob_invalid(t *testing.T) { } defer db.Close() - err = db.Exec(`CREATE TABLE IF NOT EXISTS test (col)`) + err = db.Exec(`CREATE TABLE test (col)`) if err != nil { t.Fatal(err) } @@ -242,7 +242,7 @@ func TestBlob_Write_readonly(t *testing.T) { } defer db.Close() - err = db.Exec(`CREATE TABLE IF NOT EXISTS test (col)`) + err = db.Exec(`CREATE TABLE test (col)`) if err != nil { t.Fatal(err) } @@ -273,7 +273,7 @@ func TestBlob_Read_expired(t *testing.T) { } defer db.Close() - err = db.Exec(`CREATE TABLE IF NOT EXISTS test (col)`) + err = db.Exec(`CREATE TABLE test (col)`) if err != nil { t.Fatal(err) } @@ -309,7 +309,7 @@ func TestBlob_Seek(t *testing.T) { } defer db.Close() - err = db.Exec(`CREATE TABLE IF NOT EXISTS test (col)`) + err = db.Exec(`CREATE TABLE test (col)`) if err != nil { t.Fatal(err) } @@ -358,7 +358,7 @@ func TestBlob_Reopen(t *testing.T) { } defer db.Close() - err = db.Exec(`CREATE TABLE IF NOT EXISTS test (col)`) + err = db.Exec(`CREATE TABLE test (col)`) if err != nil { t.Fatal(err) } diff --git a/tests/driver_test.go b/tests/driver_test.go index 2d57a07..e474d09 100644 --- a/tests/driver_test.go +++ b/tests/driver_test.go @@ -27,7 +27,7 @@ func TestDriver(t *testing.T) { defer conn.Close() res, err := conn.ExecContext(ctx, - `CREATE TABLE IF NOT EXISTS users (id INT, name VARCHAR(10))`) + `CREATE TABLE users (id INT, name VARCHAR(10))`) if err != nil { t.Fatal(err) } diff --git a/tests/func_test.go b/tests/func_test.go index 0d86b68..a727e6c 100644 --- a/tests/func_test.go +++ b/tests/func_test.go @@ -196,7 +196,7 @@ func TestAnyCollationNeeded(t *testing.T) { } defer db.Close() - err = db.Exec(`CREATE TABLE IF NOT EXISTS users (id INT, name VARCHAR(10))`) + err = db.Exec(`CREATE TABLE users (id INT, name VARCHAR(10))`) if err != nil { t.Fatal(err) } diff --git a/tests/json_test.go b/tests/json_test.go index 7eb2218..70a4b07 100644 --- a/tests/json_test.go +++ b/tests/json_test.go @@ -31,7 +31,7 @@ func TestJSON(t *testing.T) { } defer conn.Close() - _, err = conn.ExecContext(ctx, `CREATE TABLE IF NOT EXISTS test (col)`) + _, err = conn.ExecContext(ctx, `CREATE TABLE test (col)`) if err != nil { t.Fatal(err) } diff --git a/tests/stmt_test.go b/tests/stmt_test.go index 0c0250c..5284ead 100644 --- a/tests/stmt_test.go +++ b/tests/stmt_test.go @@ -19,7 +19,7 @@ func TestStmt(t *testing.T) { } defer db.Close() - err = db.Exec(`CREATE TABLE IF NOT EXISTS test (col)`) + err = db.Exec(`CREATE TABLE test (col)`) if err != nil { t.Fatal(err) } diff --git a/tests/time_test.go b/tests/time_test.go index 38a439e..23b5be2 100644 --- a/tests/time_test.go +++ b/tests/time_test.go @@ -146,8 +146,7 @@ func TestTimeFormat_Scanner(t *testing.T) { } defer conn.Close() - _, err = conn.ExecContext(ctx, - `CREATE TABLE IF NOT EXISTS test (col)`) + _, err = conn.ExecContext(ctx, `CREATE TABLE test (col)`) if err != nil { t.Fatal(err) } @@ -178,7 +177,7 @@ func TestDB_timeCollation(t *testing.T) { } defer db.Close() - err = db.Exec(`CREATE TABLE IF NOT EXISTS times (tstamp COLLATE TIME)`) + err = db.Exec(`CREATE TABLE times (tstamp COLLATE TIME)`) if err != nil { t.Fatal(err) } diff --git a/tests/txn_test.go b/tests/txn_test.go index 3699ffe..2a77efb 100644 --- a/tests/txn_test.go +++ b/tests/txn_test.go @@ -22,7 +22,7 @@ func TestConn_Transaction_exec(t *testing.T) { db.CommitHook(func() bool { return true }) db.UpdateHook(func(sqlite3.AuthorizerActionCode, string, string, int64) {}) - err = db.Exec(`CREATE TABLE IF NOT EXISTS test (col)`) + err = db.Exec(`CREATE TABLE test (col)`) if err != nil { t.Fatal(err) } @@ -95,7 +95,7 @@ func TestConn_Transaction_panic(t *testing.T) { } defer db.Close() - err = db.Exec(`CREATE TABLE IF NOT EXISTS test (col)`) + err = db.Exec(`CREATE TABLE test (col)`) if err != nil { t.Fatal(err) } @@ -153,7 +153,7 @@ func TestConn_Transaction_interrupt(t *testing.T) { } defer db.Close() - err = db.Exec(`CREATE TABLE IF NOT EXISTS test (col)`) + err = db.Exec(`CREATE TABLE test (col)`) if err != nil { t.Fatal(err) } @@ -255,7 +255,7 @@ func TestConn_Transaction_rollback(t *testing.T) { } defer db.Close() - err = db.Exec(`CREATE TABLE IF NOT EXISTS test (col)`) + err = db.Exec(`CREATE TABLE test (col)`) if err != nil { t.Fatal(err) } @@ -301,7 +301,7 @@ func TestConn_Savepoint_exec(t *testing.T) { } defer db.Close() - err = db.Exec(`CREATE TABLE IF NOT EXISTS test (col)`) + err = db.Exec(`CREATE TABLE test (col)`) if err != nil { t.Fatal(err) } @@ -369,7 +369,7 @@ func TestConn_Savepoint_panic(t *testing.T) { } defer db.Close() - err = db.Exec(`CREATE TABLE IF NOT EXISTS test (col)`) + err = db.Exec(`CREATE TABLE test (col)`) if err != nil { t.Fatal(err) } @@ -426,7 +426,7 @@ func TestConn_Savepoint_interrupt(t *testing.T) { } defer db.Close() - err = db.Exec(`CREATE TABLE IF NOT EXISTS test (col)`) + err = db.Exec(`CREATE TABLE test (col)`) if err != nil { t.Fatal(err) } @@ -506,7 +506,7 @@ func TestConn_Savepoint_rollback(t *testing.T) { } defer db.Close() - err = db.Exec(`CREATE TABLE IF NOT EXISTS test (col)`) + err = db.Exec(`CREATE TABLE test (col)`) if err != nil { t.Fatal(err) } diff --git a/vfs/memdb/memdb_test.go b/vfs/memdb/memdb_test.go index 5a62c47..eec7bb1 100644 --- a/vfs/memdb/memdb_test.go +++ b/vfs/memdb/memdb_test.go @@ -21,7 +21,7 @@ func Test_wal(t *testing.T) { } defer db.Close() - err = db.Exec(`CREATE TABLE IF NOT EXISTS users (id INT, name VARCHAR(10))`) + err = db.Exec(`CREATE TABLE users (id INT, name VARCHAR(10))`) if err != nil { t.Fatal(err) }