better_structure_sql 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 067320c86a8a8e2064c41dd5ac93acd1d89652213a61f9efed61a2b946c44660
4
- data.tar.gz: f31e6dc7cb21647d8836f8f81da99097ed1c536db1b0adb7af33cf511ee401d1
3
+ metadata.gz: d309fdf24a779a29028226f4e0926d28087b9045fdff1b9625522bdac430f169
4
+ data.tar.gz: db6dbe765d3d385a1b8867d3ad1f54825f7cbeed887ab17b7e02a06f63d5ef48
5
5
  SHA512:
6
- metadata.gz: 581f226ac09dd57a6ab5f058615bcd1aba7e5eaca5abb01c62e3431b6c72ec7c9fe47422cf5e1bc8e5a336df4e64de386dbf7841cd4a2f6fafcd76feb50b575f
7
- data.tar.gz: cd77d7dd9898c14ea6cfad1fa528de9b1cfb83d15d4d98253a9229ac7fb6fe84ad1b884cd9bfda7d815fd3cb87260ba559e3c7f44f33ee14a60661dce2e732cb
6
+ metadata.gz: 6d2f15acedf160011639a0653dce7c639cf6e825c4e9a9638bf76e3262ee02d1cd76fc6726b3ff79c03a6054953f2310d6f61fd92af87974face17888574640c
7
+ data.tar.gz: c559251fe213ffabf576ab234ded58970dd54905813db0e6d3c9ee45a951a9435feac53d05eb93c4758df40829b6e91af509eebe647a72349eb036e12df52283
data/CHANGELOG.md CHANGED
@@ -13,6 +13,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
13
13
 
14
14
  ### Fixed
15
15
 
16
+ ## [0.2.1] - 2025-11-20
17
+
18
+ ### Changed
19
+ - Improved schema version web UI with content hash display (first 8 characters)
20
+ - Increased view limit for better visibility of stored schema versions
21
+
16
22
  ## [0.2.0] - 2025-11-20
17
23
 
18
24
  ### Added
data/README.md CHANGED
@@ -16,7 +16,7 @@
16
16
 
17
17
  </div>
18
18
 
19
- > **⚠️ Beta Notice**: Version 0.2.0 is feature-complete and production-ready for **PostgreSQL**. Multi-database support (MySQL, SQLite) is implemented but considered experimental. APIs are stable but may see minor refinements before v1.0. We welcome feedback and contributions!
19
+ > **⚠️ Beta Notice**: Version 0.2.1 is feature-complete and production-ready for **PostgreSQL**. Multi-database support (MySQL, SQLite) is implemented but considered experimental. APIs are stable but may see minor refinements before v1.0. We welcome feedback and contributions!
20
20
 
21
21
  ## ✨ Why BetterStructureSql?
22
22
 
@@ -11,8 +11,9 @@ module BetterStructureSql
11
11
  class SchemaVersionsController < ApplicationController
12
12
  # Maximum file size to load into memory (2MB)
13
13
  MAX_MEMORY_SIZE = 2.megabytes
14
- # Maximum file size to display in browser (200KB)
15
- MAX_DISPLAY_SIZE = 200.kilobytes
14
+ # Maximum file size to display in browser (1MB)
15
+ # Large enough for most schemas but keeps browser responsive
16
+ MAX_DISPLAY_SIZE = 1.megabyte
16
17
 
17
18
  # Lists stored schema versions with pagination
18
19
  #
@@ -25,7 +26,7 @@ module BetterStructureSql
25
26
  # Load only metadata for listing (no content or zip_archive)
26
27
  @schema_versions = SchemaVersion
27
28
  .select(:id, :pg_version, :format_type, :output_mode, :created_at,
28
- :content_size, :file_count)
29
+ :content_size, :file_count, :content_hash)
29
30
  .order(created_at: :desc)
30
31
  .limit(100)
31
32
  end
@@ -43,7 +44,7 @@ module BetterStructureSql
43
44
  # Load metadata first
44
45
  @schema_version = SchemaVersion
45
46
  .select(:id, :pg_version, :format_type, :output_mode, :created_at,
46
- :content_size, :line_count, :file_count)
47
+ :content_size, :line_count, :file_count, :content_hash)
47
48
  .find(params[:id])
48
49
 
49
50
  # Only load content for small single-file versions
@@ -27,6 +27,7 @@
27
27
  <thead class="table-light">
28
28
  <tr>
29
29
  <th scope="col" class="text-center" style="width: 80px;">ID</th>
30
+ <th scope="col" style="width: 120px;">Hash</th>
30
31
  <th scope="col" style="width: 120px;">Format</th>
31
32
  <th scope="col" style="width: 150px;">Mode</th>
32
33
  <th scope="col" style="width: 180px;">PostgreSQL</th>
@@ -42,6 +43,11 @@
42
43
  <td class="text-center fw-bold text-muted">
43
44
  #<%= version.id %>
44
45
  </td>
46
+ <td>
47
+ <code class="text-muted small" title="<%= version.content_hash %>">
48
+ <%= version.content_hash[0..7] %>
49
+ </code>
50
+ </td>
45
51
  <td>
46
52
  <%= format_type_badge(version.format_type) %>
47
53
  </td>
@@ -93,6 +93,18 @@
93
93
  </p>
94
94
  </div>
95
95
  </div>
96
+
97
+ <div class="row mt-3">
98
+ <div class="col-md-12">
99
+ <h6 class="text-muted mb-1">
100
+ <i class="bi bi-fingerprint"></i>
101
+ Content Hash (MD5)
102
+ </h6>
103
+ <p class="mb-0">
104
+ <code class="text-muted"><%= @schema_version.content_hash %></code>
105
+ </p>
106
+ </div>
107
+ </div>
96
108
  </div>
97
109
  </div>
98
110
 
@@ -153,7 +165,7 @@
153
165
  <i class="bi bi-exclamation-triangle"></i>
154
166
  <strong>File too large to display</strong>
155
167
  <p class="mb-0 mt-2">
156
- This schema file is too large to display in the browser (limit: 200 KB).
168
+ This schema file is too large to display in the browser (limit: 1 MB).
157
169
  Please use the "Download" button above to download and view it locally.
158
170
  </p>
159
171
  </div>
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BetterStructureSql
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: better_structure_sql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - sebyx07