Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2c9773e

Browse files
kmuratovdhui
authored andcommitted
Added Firebird support (golang-migrate#191)
* Added Firebird support * Fixed typo * Refactoring * Schema migrations table name don't have to be upper case * Fixed readme * Added Firebird 2.5 support * Removed SchemaName * Refactoring
1 parent 46fb82c commit 2c9773e

19 files changed

+501
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Database drivers run migrations. [Add a new database?](database/driver.go)
3636
* [Google Cloud Spanner](database/spanner)
3737
* [CockroachDB](database/cockroachdb)
3838
* [ClickHouse](database/clickhouse)
39+
* [Firebird](database/firebird)
3940

4041
### Database URLs
4142

database/firebird/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# firebird
2+
3+
`firebirdsql://user:password@servername[:port_number]/database_name_or_file[?params1=value1[&param2=value2]...]`
4+
5+
| URL Query | WithInstance Config | Description |
6+
|------------|---------------------|-------------|
7+
| `x-migrations-table` | `MigrationsTable` | Name of the migrations table |
8+
| `auth_plugin_name` | | Authentication plugin name. Srp256/Srp/Legacy_Auth are available. (default is Srp) |
9+
| `column_name_to_lower` | | Force column name to lower. (default is false) |
10+
| `role` | | Role name |
11+
| `tzname` | | Time Zone name. (For Firebird 4.0+) |
12+
| `wire_crypt` | | Enable wire data encryption or not. For Firebird 3.0+ (default is true) |
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DROP TABLE users;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
CREATE TABLE users (
2+
user_id integer unique,
3+
name varchar(40),
4+
email varchar(40)
5+
);
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE users DROP city;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ALTER TABLE users ADD city varchar(100);
2+
3+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DROP INDEX users_email_index;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CREATE UNIQUE INDEX users_email_index ON users (email);
2+
3+
-- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean sed interdum velit, tristique iaculis justo. Pellentesque ut porttitor dolor. Donec sit amet pharetra elit. Cras vel ligula ex. Phasellus posuere.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DROP TABLE books;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
CREATE TABLE books (
2+
user_id integer,
3+
name varchar(40),
4+
author varchar(40)
5+
);

0 commit comments

Comments
 (0)