erdb 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fb43b27d324884db21ead2653426adbeba09a183733ee33bb4675b601d49d40c
4
- data.tar.gz: 32e01870dabcc268910d912afa9d4b5341afd5a3f3b7afed38fc1aea3c1b6bb9
3
+ metadata.gz: c78c60da7522f9f14d1fb6a56e3f2531d8b24311aa3179649032415fb5bea5e3
4
+ data.tar.gz: 4b7efdc217e9fdaa8d2b6fd7e41dfa5f8e4acae0aefc705d20bd8d61889f1469
5
5
  SHA512:
6
- metadata.gz: a220a81b743ff5c8ccc3bdec373d788ef6ef64fac8f8db2eebfb0ab95b96d13be351e74340f91534165e9a1d1fa3a8f9b5d5730f34073e8353ec929fb7ab13cb
7
- data.tar.gz: a445779b1ac54a74c5acc673f5bf3905868a880200843e413df643091da05ac8eb407ae2faaef421b131dce349eaeb5c5e969cb11e1aedd68ca79932c60de114
6
+ metadata.gz: b4515effe4b61586d0cb94e67d65e51b1ca350aeb74f41c7c98e69993f146a82095256421403272234f808b5b00e90f9c2ed1a413d3f073a8a8e0bcb463dd389
7
+ data.tar.gz: f8b12f1fa9c0446fe3a7029e7f3a2ca424ba7034cab3aaaea30e46dcb1750abe0d98856ba79d6baec55cacd9a58783fc56c85a96c7e90f33d165840f8e72e257
data/CHANGES.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 1.1.1
2
+
3
+ - Show `No Tables` error message when there is no tables.
4
+
1
5
  ### 1.1.0
2
6
 
3
7
  - Use `Thor` to make cli.
data/README.md CHANGED
@@ -7,10 +7,6 @@ ERDB is just a wrapper to automate the process of generating ERD using -
7
7
  - [Azimutt(Open Source)](https://azimutt.app)
8
8
  - [DBDiagram](https://dbdiagram.io)
9
9
 
10
- > Currently there is no support for `one-to-one` relationship. If you want to use it you have to manually edit the generated ERD.
11
-
12
- <!-- graphviz coming soon -->
13
-
14
10
  ## Demo
15
11
 
16
12
  ![erdb](./images/erdb.gif)
@@ -28,14 +24,12 @@ Use the package manager [gem](https://rubygems.org/) to install ERDB.
28
24
  gem install erdb
29
25
  ```
30
26
 
31
- > Important note for Linux users: The clipboard requires the _xsel_ or the _xclip_ command-line program. On debian and ubuntu, _xsel_ can be installed with: `sudo apt-get install xsel`
32
- > Visit [clipboard](https://github.com/janlelis/clipboard) for more details.
27
+ > Important note for Linux users: You need to install the _xsel_ or the _xclip_ command-line program. On debian and ubuntu, _xsel_ can be installed with: `sudo apt-get install xsel`
28
+ > Visit [clipboard](https://github.com/janlelis/clipboard) for more details about clipboard.
33
29
 
34
30
  #### Adapters
35
31
 
36
- For `mysql2` and `postgresql` database, you have to install the required gem.
37
- I didn't include them in the gemspec because I don't want to install them if you don't need them.
38
- Because it depends on native extensions, you'll need a compiler and the development headers for your Ruby and database.
32
+ For `mysql2` and `postgresql` database, you have to install the required gems.
39
33
 
40
34
  ```bash
41
35
  gem install mysql2
@@ -50,12 +44,16 @@ After install ERDB, you can use `erdb` command to generate ER Diagram.
50
44
  erdb
51
45
  ```
52
46
 
47
+ It use chrome browser by default to genereate ERD.
48
+ You can use other browser by passing `--browser` option.
49
+
50
+ > See more options by running `erdb --help`
51
+
53
52
  ## Why I created this gem?
54
53
 
55
54
  I know there are many tools available for generating ERD,
56
- but I wanted to create a tool that is easy to use and can be used with any database.
57
- `Azimutt` also support converting schema to ERD, but it's only working well with remote databases.
58
- If I want to generate local database using `Azimutt`, I have to setup `Azimutt` locally that is alot of step -\_-
55
+ But I wanted to create a tool that is easy to use and can be used with any database.
56
+ And I don't want to repeat the same steps again and again for generating ERD. -_-
59
57
 
60
58
  ## Roadmap
61
59
 
@@ -66,7 +64,7 @@ If I want to generate local database using `Azimutt`, I have to setup `Azimutt`
66
64
 
67
65
  ## Contributing
68
66
 
69
- Pull requests are welcome. Feel free to open an issue first to discuss what you would like to change.
67
+ Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
70
68
 
71
69
  ## License
72
70
 
@@ -37,6 +37,9 @@ module ERDB
37
37
  #
38
38
  def to_erdb
39
39
  puts "\nAnalyzing database..."
40
+
41
+ raise "No tables found in database." if @connection.tables.empty?
42
+
40
43
  @connection.tables.map do |table|
41
44
  columns = @connection.columns(table).map { |column| { name: column.name, type: column.type || "unknown" } }
42
45
  relations = @connection.foreign_keys(table).map do |fk|
data/lib/erdb/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module ERDB
2
- VERSION = "1.1.0".freeze
2
+ VERSION = "1.1.1".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: erdb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wai Yan Phyo