@panoptic-it-solutions/coolify-setup 1.1.38 → 1.1.39

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.
@@ -26,25 +26,39 @@ ${pnpmSetup}
26
26
 
27
27
  - name: Check migrations are up to date
28
28
  run: |
29
+ # Check if migrations folder exists and has files
30
+ if [ ! -d "${dbPath}/migrations" ] || [ -z "$(ls -A ${dbPath}/migrations 2>/dev/null)" ]; then
31
+ echo "::error::Migrations folder missing or empty!"
32
+ echo "Run locally: ${drizzleCmd}"
33
+ echo "Then commit the generated migration files."
34
+ exit 1
35
+ fi
36
+
37
+ # Run generate and check if it creates NEW migration files
38
+ # (this catches schema changes that weren't migrated)
39
+ BEFORE_COUNT=$(find ${dbPath}/migrations -name "*.sql" 2>/dev/null | wc -l)
29
40
  ${drizzleCmd}
30
- if [ -n "$(git status --porcelain ${dbPath}/migrations)" ]; then
41
+ AFTER_COUNT=$(find ${dbPath}/migrations -name "*.sql" 2>/dev/null | wc -l)
42
+
43
+ if [ "$AFTER_COUNT" -gt "$BEFORE_COUNT" ]; then
31
44
  echo "::error::Schema changes detected without migrations!"
32
- echo "The database schema has changed but migrations are not up to date."
45
+ echo "drizzle-kit generate created new migration files."
33
46
  echo ""
34
47
  echo "To fix this, run locally:"
35
48
  echo " ${drizzleCmd}"
36
49
  echo ""
37
50
  echo "Then commit the generated migration files."
38
51
  git status ${dbPath}/migrations
39
- git diff ${dbPath}/migrations
40
52
  exit 1
41
53
  fi
54
+
42
55
  echo "Migrations are up to date"
43
56
 
44
57
  - name: Verify migrations exist
45
58
  run: |
46
59
  echo "Checking migrations in build context:"
47
60
  ls -la ${dbPath}/migrations/
61
+ test -f ${dbPath}/migrations/meta/_journal.json || (echo "ERROR: _journal.json missing!" && exit 1)
48
62
  ` : '';
49
63
  return `name: Build and Deploy
50
64
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panoptic-it-solutions/coolify-setup",
3
- "version": "1.1.38",
3
+ "version": "1.1.39",
4
4
  "description": "CLI tool for setting up Coolify deployment on Panoptic projects",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",