Remove native MySQL dependencies and code wherever I found it.

This includes:

  - CI scripts
  - Cabal dependency lists
  - Dockerfiles
  - Docker Compose files
  - server test harness code

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9066
GitOrigin-RevId: 509d7931693c4755509d5b8e5bcf50b42cc24769
This commit is contained in:
Samir Talwar 2023-05-06 00:18:57 +02:00 committed by hasura-bot
parent 61228e2613
commit bc8c7406df
10 changed files with 10 additions and 56 deletions

View File

@ -238,8 +238,6 @@ constraints: any.Cabal ==3.6.3.0,
any.mtl ==2.2.2,
any.mtl-compat ==0.2.2,
any.mustache ==2.4.1,
any.mysql ==0.2.1,
any.mysql-simple ==0.4.9,
any.natural-transformation ==0.4,
any.network ==3.1.2.7,
any.network-bsd ==2.8.1.0,

View File

@ -32,15 +32,6 @@ version: "3.6"
name: hge-manual-tests
services:
mariadb:
extends:
file: docker-compose/databases.yaml
service: mariadb
ports:
- "65001:3306"
volumes:
- mariadb-data:/var/lib/mysql
postgres:
extends:
file: docker-compose/databases.yaml
@ -111,6 +102,5 @@ services:
volumes:
citus-data:
cockroach-data:
mariadb-data:
mssql-data:
postgres-data:

View File

@ -1,29 +1,6 @@
version: "3.6"
services:
mariadb:
image: mariadb:10
ports:
- 3306
environment:
MARIADB_USER: "hasura"
MARIADB_PASSWORD: "hasura"
MARIADB_DATABASE: "hasura"
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: "true"
MARIADB_MYSQL_LOCALHOST_USER: "1"
volumes:
- /var/lib/mysql
healthcheck:
test:
- CMD
- /usr/local/bin/healthcheck.sh
- --connect
- --innodb_initialized
start_period: 5s
interval: 5s
timeout: 10s
retries: 20
postgres:
image: postgis/postgis:15-3.3-alpine
platform: linux/amd64

View File

@ -17,7 +17,7 @@ RUN set -ex; \
apt-get update; \
apt-get install -y apt-transport-https curl gnupg2; \
apt-get update; \
apt-get install -y ca-certificates libkrb5-3 libpq5 libssl1.1 libnuma1 unixodbc-dev libmariadb-dev-compat mariadb-client
apt-get install -y ca-certificates libkrb5-3 libpq5 libssl1.1 libnuma1 unixodbc-dev
RUN set -ex; \
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -; \

View File

@ -73,6 +73,5 @@ services:
volumes:
citus-data:
cockroach-data:
mariadb-data:
mssql-data:
postgres-data:

View File

@ -72,8 +72,7 @@ defaultDateTimeType :: Schema.ScalarType
defaultDateTimeType =
Schema.TCustomType $
Schema.defaultBackendScalarType
{ Schema.bstMysql = Nothing,
Schema.bstMssql = Just "DATETIME DEFAULT GETDATE()",
{ Schema.bstMssql = Just "DATETIME DEFAULT GETDATE()",
Schema.bstCitus = Just "TIMESTAMP DEFAULT NOW()",
Schema.bstPostgres = Just "TIMESTAMP DEFAULT NOW()",
Schema.bstBigQuery = Nothing

View File

@ -72,8 +72,7 @@ schema =
Schema.column "address" $
Schema.TCustomType
Schema.defaultBackendScalarType
{ Schema.bstMysql = Just "JSON",
Schema.bstCitus = Just "JSON",
{ Schema.bstCitus = Just "JSON",
Schema.bstCockroach = Just "JSON",
Schema.bstPostgres = Just "JSON",
Schema.bstBigQuery = Just "JSON"
@ -85,8 +84,7 @@ schema =
Schema.VStr "Justin",
Schema.VCustomValue $
Schema.defaultBackendScalarValue
{ Schema.bsvMysql = Just (Schema.Quoted "{ \"city\": \"Bristol\" }"),
Schema.bsvCitus = Just (Schema.Quoted "{ \"city\": \"Bristol\" }"),
{ Schema.bsvCitus = Just (Schema.Quoted "{ \"city\": \"Bristol\" }"),
Schema.bsvCockroach = Just (Schema.Quoted "{ \"city\": \"Bristol\" }"),
Schema.bsvPostgres = Just (Schema.Quoted "{ \"city\": \"Bristol\" }"),
Schema.bsvBigQuery = Just (Schema.Unquoted "JSON '{ \"city\": \"Bristol\" }'")

View File

@ -81,8 +81,7 @@ defaultDateTimeType :: Schema.ScalarType
defaultDateTimeType =
Schema.TCustomType $
Schema.defaultBackendScalarType
{ Schema.bstMysql = Nothing,
Schema.bstMssql = Just "DATETIME DEFAULT GETDATE()",
{ Schema.bstMssql = Just "DATETIME DEFAULT GETDATE()",
Schema.bstCitus = Just "TIMESTAMP DEFAULT NOW()",
Schema.bstPostgres = Just "TIMESTAMP DEFAULT NOW()",
Schema.bstCockroach = Just "TIMESTAMP DEFAULT NOW()",

View File

@ -35,8 +35,7 @@ import Hasura.Prelude
-- very simple to achive instead of making you define a new sum type
-- and handling it.
data BackendScalarType = BackendScalarType
{ bstMysql :: Maybe Text,
bstCitus :: Maybe Text,
{ bstCitus :: Maybe Text,
bstCockroach :: Maybe Text,
bstPostgres :: Maybe Text,
bstBigQuery :: Maybe Text,
@ -50,8 +49,7 @@ data BackendScalarType = BackendScalarType
defaultBackendScalarType :: BackendScalarType
defaultBackendScalarType =
BackendScalarType
{ bstMysql = Nothing,
bstCitus = Nothing,
{ bstCitus = Nothing,
bstCockroach = Nothing,
bstMssql = Nothing,
bstPostgres = Nothing,
@ -101,8 +99,7 @@ formatBackendScalarValueType (Unquoted text) = text
-- for Microsoft's SQL server backend. This type provides flexibility
-- to provide such options.
data BackendScalarValue = BackendScalarValue
{ bsvMysql :: Maybe BackendScalarValueType,
bsvCitus :: Maybe BackendScalarValueType,
{ bsvCitus :: Maybe BackendScalarValueType,
bsvCockroach :: Maybe BackendScalarValueType,
bsvPostgres :: Maybe BackendScalarValueType,
bsvBigQuery :: Maybe BackendScalarValueType,
@ -116,8 +113,7 @@ data BackendScalarValue = BackendScalarValue
defaultBackendScalarValue :: BackendScalarValue
defaultBackendScalarValue =
BackendScalarValue
{ bsvMysql = Nothing,
bsvCitus = Nothing,
{ bsvCitus = Nothing,
bsvCockroach = Nothing,
bsvPostgres = Nothing,
bsvBigQuery = Nothing,
@ -165,8 +161,7 @@ defaultSerialType :: ScalarType
defaultSerialType =
TCustomType $
defaultBackendScalarType
{ bstMysql = Nothing,
bstMssql = Just "INT IDENTITY(1,1)",
{ bstMssql = Just "INT IDENTITY(1,1)",
bstCitus = Just "SERIAL",
-- cockroachdb's serial behaves differently than postgresql's serial:
-- https://www.cockroachlabs.com/docs/v22.1/serial

View File

@ -40,7 +40,6 @@ library
, managed
, morpheus-graphql
, mtl
, mysql-simple
, network
, odbc
, openapi3