|
46 | 46 |
|
47 | 47 | - name: Setup test data in source MySQL |
48 | 48 | run: | |
49 | | - mysqlsh -hlocalhost -P13306 -uroot -proot --sql -e " |
| 49 | + mysqlsh -hlocalhost -P13306 -uroot -proot --sql <<'EOF' |
50 | 50 | CREATE DATABASE testdb; |
51 | 51 | USE testdb; |
52 | 52 | -- Normal table, which should be copied to MyDuck via duckdb's csv import |
@@ -74,18 +74,19 @@ jobs: |
74 | 74 |
|
75 | 75 | -- Table with UUID primary key |
76 | 76 | -- For such tables, MySQL Shell generates nontrivial LOAD DATA statements |
77 | | - -- to copy the data to MyDuck: `LOAD DATA ... (@id, title, created_at) SET id = FROM_BASE64(@id)`, |
| 77 | + -- to copy the data to MyDuck: LOAD DATA ... (@id, title, created_at) SET id = FROM_BASE64(@id), |
78 | 78 | -- which can only be executed by the go-mysql-server framework for now. |
79 | 79 | CREATE TABLE documents ( |
80 | 80 | id BINARY(16) PRIMARY KEY, |
81 | 81 | title VARCHAR(200), |
| 82 | + status ENUM('draft', 'published', 'archived') DEFAULT 'draft', |
82 | 83 | created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP |
83 | 84 | ); |
84 | 85 |
|
85 | | - INSERT INTO documents (id, title) VALUES |
86 | | - (UUID_TO_BIN(UUID()), 'Document 1'), |
87 | | - (UUID_TO_BIN(UUID()), 'Document 2'); |
88 | | - " |
| 86 | + INSERT INTO documents (id, title, status) VALUES |
| 87 | + (UUID_TO_BIN(UUID()), 'Document 1', 'published'), |
| 88 | + (UUID_TO_BIN(UUID()), 'Document 2', 'draft'); |
| 89 | + EOF |
89 | 90 |
|
90 | 91 | - name: Build and start MyDuck Server |
91 | 92 | run: | |
|
0 commit comments