- Changed VAPID subject from public URL to mailto format - Updated docker-compose.yml to use mailto:admin@littleshop.local - Removed dependency on thebankofdebbie.giize.com public domain - All push notifications now work through VPN (admin.dark.side) only - Added update-push-internal.sh helper script for deployment - Improved security by keeping all admin traffic internal Push notifications will continue working normally through FCM, but all configuration and management stays on the internal network. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
82 lines
2.8 KiB
C#
82 lines
2.8 KiB
C#
using System;
|
|
using System.IO;
|
|
using Microsoft.Data.Sqlite;
|
|
|
|
Console.WriteLine("=== DATABASE VERIFICATION ===\n");
|
|
|
|
var dbPath = Path.Combine("..", "LittleShop", "littleshop-dev.db");
|
|
using var conn = new SqliteConnection($"Data Source={dbPath}");
|
|
conn.Open();
|
|
|
|
// Check Products table for new columns
|
|
Console.WriteLine("✓ PRODUCTS TABLE:");
|
|
using var cmd1 = conn.CreateCommand();
|
|
cmd1.CommandText = "PRAGMA table_info(Products)";
|
|
using var reader1 = cmd1.ExecuteReader();
|
|
var foundVariantCollectionId = false;
|
|
var foundVariantsJson = false;
|
|
while (reader1.Read())
|
|
{
|
|
var colName = reader1.GetString(1);
|
|
if (colName == "VariantCollectionId") foundVariantCollectionId = true;
|
|
if (colName == "VariantsJson") foundVariantsJson = true;
|
|
}
|
|
Console.WriteLine($" - VariantCollectionId column: {(foundVariantCollectionId ? "✅ EXISTS" : "❌ MISSING")}");
|
|
Console.WriteLine($" - VariantsJson column: {(foundVariantsJson ? "✅ EXISTS" : "❌ MISSING")}");
|
|
|
|
// Check VariantCollections table exists
|
|
Console.WriteLine("\n✓ VARIANT COLLECTIONS TABLE:");
|
|
using var cmd2 = conn.CreateCommand();
|
|
cmd2.CommandText = "SELECT COUNT(*) FROM VariantCollections";
|
|
try
|
|
{
|
|
var count = Convert.ToInt32(cmd2.ExecuteScalar());
|
|
Console.WriteLine($" - Table exists: ✅ YES");
|
|
Console.WriteLine($" - Record count: {count}");
|
|
}
|
|
catch
|
|
{
|
|
Console.WriteLine(" - Table exists: ❌ NO");
|
|
}
|
|
|
|
// Check SalesLedgers table exists
|
|
Console.WriteLine("\n✓ SALES LEDGERS TABLE:");
|
|
using var cmd3 = conn.CreateCommand();
|
|
cmd3.CommandText = "SELECT COUNT(*) FROM SalesLedgers";
|
|
try
|
|
{
|
|
var count = Convert.ToInt32(cmd3.ExecuteScalar());
|
|
Console.WriteLine($" - Table exists: ✅ YES");
|
|
Console.WriteLine($" - Record count: {count}");
|
|
}
|
|
catch
|
|
{
|
|
Console.WriteLine(" - Table exists: ❌ NO");
|
|
}
|
|
|
|
// Check Products with data
|
|
Console.WriteLine("\n✓ PRODUCTS DATA:");
|
|
using var cmd4 = conn.CreateCommand();
|
|
cmd4.CommandText = "SELECT COUNT(*), COUNT(VariantCollectionId), COUNT(VariantsJson) FROM Products";
|
|
using var reader4 = cmd4.ExecuteReader();
|
|
if (reader4.Read())
|
|
{
|
|
Console.WriteLine($" - Total products: {reader4.GetInt32(0)}");
|
|
Console.WriteLine($" - With VariantCollectionId: {reader4.GetInt32(1)}");
|
|
Console.WriteLine($" - With VariantsJson: {reader4.GetInt32(2)}");
|
|
}
|
|
|
|
// Check OrderItems for SelectedVariants
|
|
Console.WriteLine("\n✓ ORDER ITEMS TABLE:");
|
|
using var cmd5 = conn.CreateCommand();
|
|
cmd5.CommandText = "PRAGMA table_info(OrderItems)";
|
|
using var reader5 = cmd5.ExecuteReader();
|
|
var foundSelectedVariants = false;
|
|
while (reader5.Read())
|
|
{
|
|
if (reader5.GetString(1) == "SelectedVariants") foundSelectedVariants = true;
|
|
}
|
|
Console.WriteLine($" - SelectedVariants column: {(foundSelectedVariants ? "✅ EXISTS" : "❌ MISSING")}");
|
|
|
|
Console.WriteLine("\n✅ DATABASE VERIFICATION COMPLETE!\n");
|
|
conn.Close(); |