Skip to content
This repository was archived by the owner on Jun 4, 2024. It is now read-only.

Commit 512a11e

Browse files
authored
Merge pull request #5 from SOHELAHMED7/115-default-in-openapi-schema-does-not-generate-migration-with-default-in-mariadb
Fix #115
2 parents 86ae33d + 8c074a9 commit 512a11e

File tree

11 files changed

+19
-0
lines changed

11 files changed

+19
-0
lines changed

tests/specs/x_db_type/edit_column/maria/app/migrations_maria_db/m200000_000003_create_table_pristines.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public function up()
1919
7 => 'col_9 varchar(9) NULL DEFAULT NULL',
2020
8 => 'col_10 varchar(10) NULL DEFAULT NULL',
2121
9 => 'col_11 text NULL DEFAULT NULL',
22+
10 => 'price decimal(10,2) NULL DEFAULT 0',
2223
]);
2324
}
2425

tests/specs/x_db_type/edit_column/mysql/app/migrations_mysql_db/m200000_000003_create_table_pristines.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public function up()
1919
7 => 'col_9 varchar(9) NULL DEFAULT NULL',
2020
8 => 'col_10 varchar(10) NULL DEFAULT NULL',
2121
9 => 'col_11 text NULL',
22+
10 => 'price decimal(10,2) NULL DEFAULT 0',
2223
]);
2324
}
2425

tests/specs/x_db_type/edit_column/pgsql/app/migrations_pgsql_db/m200000_000003_create_table_pristines.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public function safeUp()
1919
7 => 'col_9 varchar NULL DEFAULT NULL',
2020
8 => 'col_10 varchar NULL DEFAULT NULL',
2121
9 => 'col_11 text NULL DEFAULT NULL',
22+
10 => 'price decimal(10,2) NULL DEFAULT 0',
2223
]);
2324
}
2425

tests/specs/x_db_type/fresh/maria/app/migrations_maria_db/m200000_000003_create_table_pristines.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public function up()
1919
7 => 'col_9 varchar(9) NULL DEFAULT NULL',
2020
8 => 'col_10 varchar(10) NULL DEFAULT NULL',
2121
9 => 'col_11 text NULL DEFAULT NULL',
22+
10 => 'price decimal(10,2) NULL DEFAULT 0',
2223
]);
2324
}
2425

tests/specs/x_db_type/fresh/mysql/app/migrations_mysql_db/m200000_000003_create_table_pristines.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public function up()
1919
7 => 'col_9 varchar(9) NULL DEFAULT NULL',
2020
8 => 'col_10 varchar(10) NULL DEFAULT NULL',
2121
9 => 'col_11 text NULL',
22+
10 => 'price decimal(10,2) NULL DEFAULT 0',
2223
]);
2324
}
2425

tests/specs/x_db_type/fresh/mysql/x_db_type_mysql.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ components:
5454
col_11:
5555
type: string
5656
x-db-type: TEXT
57+
price:
58+
description: price in EUR
59+
type: number
60+
x-db-type: decimal(10,2)
61+
default: 0
5762

5863

5964
Alldbdatatype: # All DB data type

tests/specs/x_db_type/fresh/pgsql/app/migrations_pgsql_db/m200000_000003_create_table_pristines.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public function safeUp()
1919
7 => 'col_9 varchar NULL DEFAULT NULL',
2020
8 => 'col_10 varchar NULL DEFAULT NULL',
2121
9 => 'col_11 text NULL DEFAULT NULL',
22+
10 => 'price decimal(10,2) NULL DEFAULT 0',
2223
]);
2324
}
2425

tests/specs/x_db_type/fresh/pgsql/x_db_type_pgsql.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ components:
5454
col_11:
5555
type: string
5656
x-db-type: TEXT
57+
price:
58+
description: price in EUR
59+
type: number
60+
x-db-type: decimal(10,2)
61+
default: 0
5762

5863

5964
Alldbdatatype: # All DB data type

tests/specs/x_db_type/new_column/maria/app/migrations_maria_db/m200000_000003_create_table_pristines.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public function up()
1919
7 => 'col_9 varchar(9) NULL DEFAULT NULL',
2020
8 => 'col_10 varchar(10) NULL DEFAULT NULL',
2121
9 => 'col_11 text NULL DEFAULT NULL',
22+
10 => 'price decimal(10,2) NULL DEFAULT 0',
2223
]);
2324
}
2425

tests/specs/x_db_type/new_column/mysql/app/migrations_mysql_db/m200000_000003_create_table_pristines.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public function up()
1919
7 => 'col_9 varchar(9) NULL DEFAULT NULL',
2020
8 => 'col_10 varchar(10) NULL DEFAULT NULL',
2121
9 => 'col_11 text NULL',
22+
10 => 'price decimal(10,2) NULL DEFAULT 0',
2223
]);
2324
}
2425

tests/specs/x_db_type/new_column/pgsql/app/migrations_pgsql_db/m200000_000003_create_table_pristines.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public function safeUp()
1919
7 => 'col_9 varchar NULL DEFAULT NULL',
2020
8 => 'col_10 varchar NULL DEFAULT NULL',
2121
9 => 'col_11 text NULL DEFAULT NULL',
22+
10 => 'price decimal(10,2) NULL DEFAULT 0',
2223
]);
2324
}
2425

0 commit comments

Comments
 (0)