Skip to content

Commit

Permalink
Merge pull request #1226 from FoalTS/drop-mariadb-support
Browse files Browse the repository at this point in the history
Drop MariaDB support
  • Loading branch information
LoicPoullain authored Sep 3, 2023
2 parents 1c0a979 + 415024f commit 3e97f9e
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 307 deletions.
14 changes: 2 additions & 12 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,6 @@ services:
MYSQL_PASSWORD: "test"
MYSQL_DATABASE: "test"

mariadb:
image: "mariadb:10.2.32"
ports:
- "3307:3306"
environment:
MYSQL_ROOT_PASSWORD: "admin"
MYSQL_USER: "test"
MYSQL_PASSWORD: "test"
MYSQL_DATABASE: "test"

postgres:
image: "postgres:9.6.18"
ports:
Expand All @@ -35,8 +25,8 @@ services:
image: "mongo:4.0.18"
ports:
- "27017:27017"

redis:
image: "redis:4.0.14"
ports:
- "6380:6379"
- "6380:6379"
70 changes: 0 additions & 70 deletions docs/docs/databases/typeorm/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ FoalTS supports officially the following databases:
| --- | --- | --- |
| PostgreSQL | 9.6+ ([Version Policy](https://www.postgresql.org/support/versioning/)) | `pg@8` |
| MySQL | 5.7+ ([Version Policy](https://en.wikipedia.org/wiki/MySQL#Release_history)) | `mysql@2` |
| MariaDB | 10.2+ ([Version Policy](https://en.wikipedia.org/wiki/MariaDB#Versioning)) | `mysql@2` |
| SQLite | 3 | `sqlite3@5` |
| MongoDB | 4.0+ ([Version Policy](https://www.mongodb.com/support-policy)) | `mongodb@3` |

Expand Down Expand Up @@ -211,75 +210,6 @@ module.exports = {
</TabItem>
</Tabs>

### MariaDB

```sh
npm install mysql
```

*config/default.{json|yml|js}*

<Tabs
defaultValue="yaml"
values={[
{label: 'YAML', value: 'yaml'},
{label: 'JSON', value: 'json'},
{label: 'JS', value: 'js'},
]}
>
<TabItem value="yaml">
```yaml
# ...

database:
type: mariadb
host: localhost
port: 3306
username: root
password: password
database: my-db
```
</TabItem>
<TabItem value="json">
```json
{
// ...

"database": {
"type": "mariadb",
"host": "localhost",
"port": 3306,
"username": "root",
"password": "password",
"database": "my-db"
}
}
```

</TabItem>
<TabItem value="js">

```javascript
module.exports = {
// ...

database: {
type: "mariadb",
host: "localhost",
port: 3306,
username: "root",
password: "password",
database: "my-db"
}
}
```

</TabItem>
</Tabs>

## Configuration and Testing

When running the command `npm run test` with the above configuration, FoalTS will try to retrieve the database configuration in this order:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ FoalTS supports officially the following databases:
| --- | --- | --- |
| PostgreSQL | 9.6+ ([Version Policy](https://www.postgresql.org/support/versioning/)) | `pg@8` |
| MySQL | 5.7+ ([Version Policy](https://en.wikipedia.org/wiki/MySQL#Release_history)) | `mysql@2` |
| MariaDB | 10.2+ ([Version Policy](https://en.wikipedia.org/wiki/MariaDB#Versioning)) | `mysql@2` |
| SQLite | 3 | `sqlite3@5` |
| MongoDB | 4.0+ ([Version Policy](https://www.mongodb.com/support-policy)) | `mongodb@3` |

Expand Down Expand Up @@ -211,75 +210,6 @@ module.exports = {
</TabItem>
</Tabs>

### MariaDB

```sh
npm install mysql
```

*config/default.{json|yml|js}*

<Tabs
defaultValue="yaml"
values={[
{label: 'YAML', value: 'yaml'},
{label: 'JSON', value: 'json'},
{label: 'JS', value: 'js'},
]}
>
<TabItem value="yaml">
```yaml
# ...

database:
type: mariadb
host: localhost
port: 3306
username: root
password: password
database: my-db
```
</TabItem>
<TabItem value="json">
```json
{
// ...

"database": {
"type": "mariadb",
"host": "localhost",
"port": 3306,
"username": "root",
"password": "password",
"database": "my-db"
}
}
```

</TabItem>
<TabItem value="js">

```javascript
module.exports = {
// ...

database: {
type: "mariadb",
host: "localhost",
port: 3306,
username: "root",
password: "password",
database: "my-db"
}
}
```

</TabItem>
</Tabs>

## Configuration and Testing

When running the command `npm run test` with the above configuration, FoalTS will try to retrieve the database configuration in this order:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ FoalTS supports officially the following databases:
| --- | --- | --- |
| PostgreSQL | 9.6+ ([Version Policy](https://www.postgresql.org/support/versioning/)) | `pg@8` |
| MySQL | 5.7+ ([Version Policy](https://en.wikipedia.org/wiki/MySQL#Release_history)) | `mysql@2` |
| MariaDB | 10.2+ ([Version Policy](https://en.wikipedia.org/wiki/MariaDB#Versioning)) | `mysql@2` |
| SQLite | 3 | `sqlite3@5` |
| MongoDB | 4.0+ ([Version Policy](https://www.mongodb.com/support-policy)) | `mongodb@3` |

Expand Down Expand Up @@ -211,75 +210,6 @@ module.exports = {
</TabItem>
</Tabs>

### MariaDB

```sh
npm install mysql
```

*config/default.{json|yml|js}*

<Tabs
defaultValue="yaml"
values={[
{label: 'YAML', value: 'yaml'},
{label: 'JSON', value: 'json'},
{label: 'JS', value: 'js'},
]}
>
<TabItem value="yaml">
```yaml
# ...

database:
type: mariadb
host: localhost
port: 3306
username: root
password: password
database: my-db
```
</TabItem>
<TabItem value="json">
```json
{
// ...

"database": {
"type": "mariadb",
"host": "localhost",
"port": 3306,
"username": "root",
"password": "password",
"database": "my-db"
}
}
```

</TabItem>
<TabItem value="js">

```javascript
module.exports = {
// ...

database: {
type: "mariadb",
host: "localhost",
port: 3306,
username: "root",
password: "password",
database: "my-db"
}
}
```

</TabItem>
</Tabs>

## Configuration and Testing

When running the command `npm run test` with the above configuration, FoalTS will try to retrieve the database configuration in this order:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ FoalTS supports officially the following databases:
| --- | --- | --- |
| PostgreSQL | 9.6+ ([Version Policy](https://www.postgresql.org/support/versioning/)) | `pg@8` |
| MySQL | 5.7+ ([Version Policy](https://en.wikipedia.org/wiki/MySQL#Release_history)) | `mysql@2` |
| MariaDB | 10.2+ ([Version Policy](https://en.wikipedia.org/wiki/MariaDB#Versioning)) | `mysql@2` |
| SQLite | 3 | `sqlite3@5` |
| MongoDB | 4.0+ ([Version Policy](https://www.mongodb.com/support-policy)) | `mongodb@3` |

Expand Down Expand Up @@ -211,75 +210,6 @@ module.exports = {
</TabItem>
</Tabs>

### MariaDB

```sh
npm install mysql
```

*config/default.{json|yml|js}*

<Tabs
defaultValue="yaml"
values={[
{label: 'YAML', value: 'yaml'},
{label: 'JSON', value: 'json'},
{label: 'JS', value: 'js'},
]}
>
<TabItem value="yaml">
```yaml
# ...

database:
type: mariadb
host: localhost
port: 3306
username: root
password: password
database: my-db
```
</TabItem>
<TabItem value="json">
```json
{
// ...

"database": {
"type": "mariadb",
"host": "localhost",
"port": 3306,
"username": "root",
"password": "password",
"database": "my-db"
}
}
```

</TabItem>
<TabItem value="js">

```javascript
module.exports = {
// ...

database: {
type: "mariadb",
host: "localhost",
port: 3306,
username: "root",
password: "password",
database: "my-db"
}
}
```

</TabItem>
</Tabs>

## Configuration and Testing

When running the command `npm run test` with the above configuration, FoalTS will try to retrieve the database configuration in this order:
Expand Down
1 change: 0 additions & 1 deletion packages/typeorm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"FoalTS",
"foal",
"postgres",
"mariadb",
"mongodb",
"mysql",
"sqlite",
Expand Down
4 changes: 1 addition & 3 deletions packages/typeorm/src/entities/group.entity.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { BaseEntity, DataSource, QueryFailedError } from 'typeorm';
import { Group } from './group.entity';
import { Permission } from './permission.entity';

function testSuite(type: 'mysql' | 'mariadb' | 'postgres' | 'sqlite') {
function testSuite(type: 'mysql' | 'postgres' | 'sqlite') {

describe(`with ${type}`, () => {

Expand All @@ -17,7 +17,6 @@ function testSuite(type: 'mysql' | 'mariadb' | 'postgres' | 'sqlite') {
before(async () => {
switch (type) {
case 'mysql':
case 'mariadb':
dataSource = new DataSource({
database: 'test',
dropSchema: true,
Expand Down Expand Up @@ -201,7 +200,6 @@ function testSuite(type: 'mysql' | 'mariadb' | 'postgres' | 'sqlite') {
describe('UserWithPermissions', () => {

testSuite('mysql');
testSuite('mariadb');
testSuite('sqlite');
testSuite('postgres');

Expand Down
Loading

0 comments on commit 3e97f9e

Please sign in to comment.