@atlashub/smartstack-cli 4.37.0 → 4.39.0

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.
@@ -28760,18 +28760,9 @@ async function checkSqlObjectsInjection(result, structure) {
28760
28760
  const sqlObjectsPath = path9.join(structure.infrastructure, "Persistence", "SqlObjects");
28761
28761
  const sqlFiles = await findFiles("**/*.sql", { cwd: sqlObjectsPath }).catch(() => []);
28762
28762
  if (sqlFiles.length === 0) return;
28763
- for (const migration of result.migrations) {
28764
- const migrationPath = path9.join(structure.root, migration.file);
28765
- const content = await readText(migrationPath).catch(() => "");
28766
- if (content && !content.includes("SqlObjectHelper.ApplyAll")) {
28767
- result.conflicts.push({
28768
- type: "sql_objects",
28769
- description: `Migration "${migration.name}" is MISSING SqlObjectHelper.ApplyAll(migrationBuilder) \u2014 ${sqlFiles.length} SQL object(s) found in SqlObjects/ will NOT be deployed`,
28770
- files: [migration.file, ...sqlFiles.map((f) => path9.relative(structure.root, f))],
28771
- resolution: 'Add "using SmartStack.Infrastructure.Persistence.SqlObjects;" at top and "SqlObjectHelper.ApplyAll(migrationBuilder);" at end of Up() method. Without this, TVFs/views/SPs will not exist in the database and cause runtime 500 errors.'
28772
- });
28773
- }
28774
- }
28763
+ result.suggestions.push(
28764
+ `${sqlFiles.length} SQL object(s) found in SqlObjects/ \u2014 these are applied automatically at application startup (no migration injection needed).`
28765
+ );
28775
28766
  }
28776
28767
  function generateSuggestions(result) {
28777
28768
  if (result.conflicts.some((c) => c.type === "snapshot")) {
@@ -28789,11 +28780,6 @@ function generateSuggestions(result) {
28789
28780
  "Ensure migrations are created in version order to avoid conflicts"
28790
28781
  );
28791
28782
  }
28792
- if (result.conflicts.some((c) => c.type === "sql_objects")) {
28793
- result.suggestions.push(
28794
- "CRITICAL: Migrations missing SqlObjectHelper.ApplyAll(migrationBuilder) will cause ALL API endpoints to return 500 at runtime. Fix immediately."
28795
- );
28796
- }
28797
28783
  if (result.migrations.length > 20) {
28798
28784
  result.suggestions.push(
28799
28785
  "Consider squashing old migrations to reduce complexity. Use: /efcore squash"