Skip to content

Commit

Permalink
uuid and enum
Browse files Browse the repository at this point in the history
  • Loading branch information
fanyang01 committed Jan 7, 2025
1 parent 121e2d9 commit ad1d946
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/mysql-copy-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Setup test data in source MySQL
run: |
mysqlsh -hlocalhost -P13306 -uroot -proot --sql -e "
mysqlsh -hlocalhost -P13306 -uroot -proot --sql <<'EOF'
CREATE DATABASE testdb;
USE testdb;
-- Normal table, which should be copied to MyDuck via duckdb's csv import
Expand Down Expand Up @@ -74,18 +74,19 @@ jobs:
-- Table with UUID primary key
-- For such tables, MySQL Shell generates nontrivial LOAD DATA statements
-- to copy the data to MyDuck: `LOAD DATA ... (@id, title, created_at) SET id = FROM_BASE64(@id)`,
-- to copy the data to MyDuck: LOAD DATA ... (@id, title, created_at) SET id = FROM_BASE64(@id),
-- which can only be executed by the go-mysql-server framework for now.
CREATE TABLE documents (
id BINARY(16) PRIMARY KEY,
title VARCHAR(200),
status ENUM('draft', 'published', 'archived') DEFAULT 'draft',
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
INSERT INTO documents (id, title) VALUES
(UUID_TO_BIN(UUID()), 'Document 1'),
(UUID_TO_BIN(UUID()), 'Document 2');
"
INSERT INTO documents (id, title, status) VALUES
(UUID_TO_BIN(UUID()), 'Document 1', 'published'),
(UUID_TO_BIN(UUID()), 'Document 2', 'draft');
EOF
- name: Build and start MyDuck Server
run: |
Expand Down

0 comments on commit ad1d946

Please sign in to comment.