"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var app_version_seeds_exports = {};
__export(app_version_seeds_exports, {
  appVersionsSeeder: () => appVersionsSeeder
});
module.exports = __toCommonJS(app_version_seeds_exports);
var import_client = require("@prisma/pg/client");
const prisma = new import_client.PrismaClient();
function getCurrentUtcTime() {
  return (/* @__PURE__ */ new Date()).toISOString();
}
async function appVersionsSeeder(company_id) {
  try {
    const utcNow = getCurrentUtcTime();
    const user = await prisma.user.findFirst({
      where: { company_id, role: "super_admin" }
    });
    if (!user) {
      console.log(
        `App Versions seeder failed: admin user not available for company id ${company_id}`
      );
      return false;
    }
    const appVersions = [
      {
        type: "lcp",
        version_type: "major",
        version: "1.0.0",
        description: `<p>1. Released version module under admin-menu -> about LCP.</p>  
                      <p>2. Added "version_grid" at master entity level.</p>  
                      <p>3. Seeder added for this version.</p>`,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Mukesh M",
        created_at: /* @__PURE__ */ new Date("2025-03-14 11:33:44.012+05:30")
      },
      {
        type: "lcp",
        version_type: "minor",
        version: "1.1.0",
        description: "Design changes implemented.",
        is_frontend_changed: true,
        is_backend_changed: false,
        is_database_changed: false,
        developed_by: "Mukesh M",
        created_at: /* @__PURE__ */ new Date("2025-03-14 11:33:44.012+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "1.1.1",
        description: 'Seeder updated for "app_version_grid".',
        is_frontend_changed: false,
        is_backend_changed: true,
        is_database_changed: false,
        developed_by: "Mukesh M",
        created_at: /* @__PURE__ */ new Date("2025-03-14 11:33:44.012+05:30")
      },
      {
        type: "lcp",
        version_type: "major",
        version: "2.0.0",
        description: `<p>1. Azure Configuration changes in Configuration screen. </p> 
                      <p>2. Powerbi Report embed changes in Master Entity and Dashboard Modules. </p> 
                      <p>3. Auto Logout Functionality based on Token Expiration and Idle Timeout and added configuration changes in Configuration screen.</p>
                      <p>4. Updated the action 'Export' as 'Export As Excel' in Master Entity and User/Role Permission screens.</p>
                      <p>5. Added Developed By and Created At column in the App Version screen and updated the db schema.</p>
                      <p>6. Include Preview option in Rich Text Editor Formly Component for Email Template and inlcuded the preview parameter in the form information.</p>
                      <p>7. Updated the delete icon in the Menu Mapping screen.</p>
                      <p>8. Included Sample JSON Template as popup for the query information, form information, report information, add/edit information and preset information in the Master entity screen and in Policy Creation screen. </p>
                      <p>9. Updated the get_grid_item procedure for the data table sorting issue.</p>
                      <p>10. Language Content and Seeder data updated.</p>
                      <p>11. Language Content Translation issue.</p>`,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Logesh T",
        created_at: /* @__PURE__ */ new Date("2025-03-20 00:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "2.0.1",
        description: `<p>1. Lazy Loading for Dynamic Routes.  </p>
                      <p>2. Included APP and LCP Latest Version Section in the settings Nav Bar.</p>`,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Logesh T",
        created_at: /* @__PURE__ */ new Date("2025-03-21 00:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "major",
        version: "3.0.0",
        description: `<p>1. Released cron setting module under admin-menu -> cron settings.  </p>
                      <p>2. Its dynamic cron setup module.  </p>
                      <p>3. Now no need server setup.</p>`,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "karthik N,Mukesh M",
        created_at: /* @__PURE__ */ new Date("2025-04-11 11:33:44.012+05:30")
      },
      {
        type: "lcp",
        version_type: "major",
        version: "4.0.0",
        description: `<p>1. Released AI Playgorund module under tools menu -> schema chunks,</p>
                      <p>2. Added Schema Chunks Generate and Edit Module,</p>
                      <p>3. Added OpenAI API Key Configurations,</p>
                      <p>4. The purpose of this module is to enable users to generate sql based on the natural language,  </p>
                      <p>5. During initial setup, don't forgot to click on sync table schema and generate vector for all chunks buttons from schema chunks module.</p>`,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Mithilesh Krishna S",
        created_at: /* @__PURE__ */ new Date("2025-04-17 11:33:44.012+05:30")
      },
      {
        type: "lcp",
        version_type: "major",
        version: "5.0.0",
        description: `<p>1. Approval Workflow and Tags modules released under admin-menu -> approval workflow and approver tags.
                      <p>2. Approver Workflow assignment, Approval Request History and Delegation modules released under tools-menu -> approval workflow assignment, approval requests and delegations.
                      <p>3. Updated the master entity screen with the draft otpion and updated the add / edit JSON with the approval workflow.
                      <p>4. The purpose of these modules is to create a approval process for a transaction which can have multiple approver levels and inlcuded the delegation functionality which is used to assign an alternative user if certain approver is not available for certain duration.,  
                      <p>5. In order to use approval process, draft option needs to be enabled for the respective screens and include the list of approval process in the add / update query information using its slug name in the form module section in master entity.
                      <p>6. Approve and reject query options has been included in the approval workflow assignment screen to perform certain action in each level.
                      <p>7. Updated the Grid and Form Builder Module to show approval process details.`,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Logesh T",
        created_at: /* @__PURE__ */ new Date("2025-04-21 11:33:44.012+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "5.0.1",
        description: `<p>1. Placeholder ($session_user_id) replacement logic has been included in the get_grid_item procedure which is applicable to search_all, search_any, having_all_conditions, having_any_conditions and join_conditions in includes for grid module.</p>
                      <p>2. Replaced $user_id placeholder with $session_user_id in form seeders.</p>
                      <p>3. Included $unique_id and $session_user_id placeholder replacement logic for policies.</p>
                      <p>4. Created Team Settings under Tools Menu where these placeholder replacement logic has been implemented as an example.</p>
                      `,
        is_frontend_changed: false,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Logesh T",
        created_at: /* @__PURE__ */ new Date("2025-04-23 11:33:44.012+05:30")
      },
      {
        type: "lcp",
        version_type: "minor",
        version: "5.1.0",
        description: "Authentication Layout changes",
        is_frontend_changed: true,
        is_backend_changed: false,
        is_database_changed: false,
        developed_by: "Rajkumar Shanmugavel",
        created_at: /* @__PURE__ */ new Date("2025-04-23 17:01:13.745124+05:30")
      },
      {
        type: "lcp",
        version_type: "major",
        version: "6.0.0",
        description: `<p>1. Released Query Builder module under tools menu -> Query Builder,</p>
                      <p>2. We can individually select, update, delete or perform other sql operations,</p>
                      <p>3. Added Textare to store the results,</p>
                      <p>4. Listed all tables and Grid Table to display the result,</p>
                      <p>5. The purpose of this module is to enable users to perform sql opertions on DB from frontend.</p>`,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Mithilesh Krishna S",
        created_at: /* @__PURE__ */ new Date("2025-04-25 11:33:44.012+05:30")
      },
      {
        type: "lcp",
        version_type: "minor",
        version: "6.1.0",
        description: `
        <p>1. Added a new tables as child_processes and child_process_logs.</p>
        <p>2. Backgorund process and Backgorund Process Logs modules have been added under Admin Module  -> Backgorund Settings -> Backgorund Processes and Backgorund Process Logs.</p>
        <p>3. The purpose of these modules is to enable the users to create a Backgorund process which can be used to perform certain tasks in the background.</p>
        `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Logesh T",
        created_at: /* @__PURE__ */ new Date("2025-05-08 17:01:13.745124+05:30")
      },
      {
        type: "lcp",
        version_type: "minor",
        version: "6.2.0",
        description: `
        <p>1. Added a new columns to store approval and reject mail template id in approval workflow,</p>
        <p>2. Modified initiate_approval_process trigger and execute_approval_process trigger and added new function to fetch email templates,</p>
        <p>3. Modified UI on Approval Assignment to accomodate approval and rejection workflow  </p>
        `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Mithilesh Krishna S",
        created_at: /* @__PURE__ */ new Date("2025-05-13 11:00:00.745124+05:30")
      },
      {
        type: "lcp",
        version_type: "minor",
        version: "6.3.0",
        description: `
        <p>1. Added a new columns to store details in approval_process_jobs and approval_process_jobs_workflow workflow,</p>
        <p>2. Approval Workflow Add Approve, Reject buttons in status tab,</p>
        <p>3. Avoid opening page link externally </p>
        `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Mithilesh Krishna S",
        created_at: /* @__PURE__ */ new Date("2025-05-19 11:00:00.745124+05:30")
      },
      {
        type: "lcp",
        version_type: "minor",
        version: "6.4.0",
        description: `
        <p>1. Added a new columns to store expression rules & messages in import template line items,</p>
        `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Rajkumar Shanmugavel",
        created_at: /* @__PURE__ */ new Date("2025-05-25 12:30:00.745124+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "6.4.1",
        description: `
        <p>1. Added <render-html> in page builder module,</p>
        <p>2. Formatted JSON, </p>
        `,
        is_frontend_changed: true,
        is_backend_changed: false,
        is_database_changed: false,
        developed_by: "Mithilesh Krishna S",
        created_at: /* @__PURE__ */ new Date("2025-05-28 11:00:00.745124+05:30")
      },
      {
        type: "lcp",
        version_type: "minor",
        version: "6.5.0",
        description: `
       <p>1. Cron job - Audit Logs Truncate (3 days once) - done,</p>
<p>2. Cron job - Request Logs Truncate (3 days once) - done,</p>
<p>3. LCP login video - Seeder level - done,</p>
<p>4. Child process setting - Background Process - all - done,</p>
<p>5. Background process list - created_at column added - done,</p>
<p>6. Each process - overall checkbox - All levels role map - done,</p>
<p>7. Scheduled Job Logs page - Implemented - done,</p>
<p>8. Table scheduled_job_logs added with columns - done:</p>
<p>&nbsp;&nbsp;- id,</p>
<p>&nbsp;&nbsp;- uuid,</p>
<p>&nbsp;&nbsp;- scheduled_job_id (foreign key),</p>
<p>&nbsp;&nbsp;- executed_statement,</p>
<p>&nbsp;&nbsp;- status,</p>
<p>&nbsp;&nbsp;- response,</p>
<p>&nbsp;&nbsp;- created_at,</p>
<p>9. Add description field in schedule_job - done,</p>
<p>10. Name changes: truncate-request*** instead of process-**** - done,</p>
<p>11. LCP filter case COALESCE problem - done,</p>
<p>12. Return query execution even on error - done,</p>
<p>13. Set Back button when detail grid comes - done,</p>
<p>14. Implement unique_id in get grid items in both frontend and backend - done,</p>
<p>15. Add description field in schedule_job frontend (add/edit forms) and backend (Seeder) - done,</p>

        `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Rajkumar Shanmugavel",
        created_at: /* @__PURE__ */ new Date("2025-06-09 08:00:00.745124+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "6.5.1",
        description: `
        <p>1. Added LIMIT in get_multiple_records procedure,</p>
        <p>2. Added OFFSET in get_multiple_records procedure, </p>
        `,
        is_frontend_changed: false,
        is_backend_changed: false,
        is_database_changed: true,
        developed_by: "Mithilesh Krishna S",
        created_at: /* @__PURE__ */ new Date("2025-06-11 11:00:00.745124+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "6.5.2",
        description: `
    <p><strong>13/06/2025</strong></p>
    <p>1. Updated info popup content for default Grid Builder in Master Entity Form Page.</p>
    <p>2. Removed default sort columns in Master Entity List Page.</p>
    <p>3. Implemented default <code>sort_columns</code> in all grid JSON (backend seeder).</p>
    <p>4. Modified get grid items procedure to prioritize frontend sort columns and fallback to DB <code>query_information</code>.</p>
    <p>5. Seeder: Background process pages changed to nested grid layout (e.g., Cron Settings page shows job logs in same page).</p>
    <p>6. Seeder: Menu name changed from "Cron Settings" to "Cron Jobs", and from "Background Process" to "Background Jobs". Grouped under "Background Process Settings".</p>
    <p>7. Fixed Policy User Mapping screen issue - now allows saving even when all users are deselected.</p>
    <p>8. Payload encryption and decryption implemented at both frontend and backend levels.</p>

    <p><strong>17/06/2025</strong></p>
    <p>9. Added encryption tokens in environment files (both frontend and backend).</p>
   
  `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Rajkumar Shanmugavel",
        created_at: /* @__PURE__ */ new Date("2025-06-13 11:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "6.5.3",
        description: `
    <p><strong>17/06/2025</strong></p>
   
    <p>1. Implemented parent-child datatable handling at LCP level.</p>
  `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Rajkumar Shanmugavel",
        created_at: /* @__PURE__ */ new Date("2025-06-17 11:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "major",
        version: "7.0.0",
        description: `<p>1. whatsapp cloud API for messages implementation</p>
        <p>2. whatsapp business account creation</p>
        <p>3. Seed for whatsapp process, tags, templates and assignments</p>
        <p>4. Custom whatsapp assignment UI</p>`,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Mithilesh Krishna S",
        created_at: /* @__PURE__ */ new Date("2025-06-23 11:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "7.0.1",
        description: `
    <p><strong>23/06/2025</strong></p>
    <p>1. Implemented an additional plus button to show the modal for the add form within each form group.</p>
    <p>2. Common link_type and link_value setup in the master_entity page for entity_grid to open a modal or redirect to a URL. [done]</p>
    <p>3. Implemented CTE in query_information for both frontend and backend (seeder grid data and list data). [done]</p>
    <p>4. Updated the CTE logic in the UI information popup. [done]</p>
    <p>5. User session logout now applies to all open tabs and restricts operations post logout.</p>
  `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Rajkumar Shanmugavel",
        created_at: /* @__PURE__ */ new Date("2025-06-23 12:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "7.0.2",
        description: `
    <p><strong>24/06/2025</strong></p>
    <p>1. Store created_at, updated_at, and deleted_at in UTC format at DB level.</p>
    <p>2. Implement TimeZone dropdown for display.</p>
    <p>3. Implement DateTime format dropdown for display.</p>
  `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Rajkumar Shanmugavel",
        created_at: /* @__PURE__ */ new Date("2025-06-24 10:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "7.0.3",
        description: `
          <p><strong>03/07/2025</strong></p>
          <p>1. "+" icon popup form now closes without refreshing the page. (Adding value to dropdown was pending earlier, now completed)</p>
          <p>2. Fixed "+" icon popup in Edit User screen to correctly insert value into the database.</p>
          <p>3. Increased popup close button size and made it configurable.</p>
          <p>4. Approval request "Approve" and "Reject" buttons are now responsive in size.</p>
          <p>5. Dashboard widget popup (users, roles, etc.) shows detailed table screen on number click.</p>
          <p>6. Default app version seeder implemented with model seeding support.</p>
          <p>7. Fetch <code>print_query</code> from DB and apply in procedure with default true.</p>
          <p>8. Set popup modal close button at the top-right corner.</p>
          <p>9. Fixed dashboard modal popup to hide grid content when not needed.</p>
          <p>10. (Pending) Configurable popup options (size, overlay, loader, etc.).</p>
        `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Rajkumar Shanmugavel",
        created_at: /* @__PURE__ */ new Date("2025-07-03 10:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "7.0.4",
        description: `
          <p><strong>23/07/2025</strong></p>
          <p>1. Enabled grid column click to open detailed data view (column click grid details).</p>
          <p>2. Introduced user-based configurations to allow personalized behavior/settings per user.</p>
        `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: false,
        developed_by: "Rajkumar Shanmugavel",
        created_at: /* @__PURE__ */ new Date("2025-07-23 10:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "minor",
        version: "7.1.1",
        description: `
          <p><strong>02/09/2025</strong></p>
          <p>1. Added Theme and Theme Attribute settings in admin menu.</p>
          <p>2. Implemented Theme switching functionality and add css for customization.</p>
        `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Kharthie Ramakrishnan",
        created_at: /* @__PURE__ */ new Date("2025-09-02 10:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "7.1.2",
        description: `
          <p><strong>11/09/2025</strong></p>
          <p>1. Automated database procedure execution with support for:</p>
          <ul>
            <li>Single execution with stop-on-failure</li>
            <li>Transactional execution with rollback-on-failure</li>
            <li>Dry-run mode to preview files before execution</li>
            <li>App-specific procedure execution commands</li>
            <li>Run only / exclude selected SQL files from command line</li>
          </ul>
          
        `,
        is_frontend_changed: false,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Rajkumar Shanmugavel",
        created_at: /* @__PURE__ */ new Date("2025-09-11 10:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "minor",
        version: "7.2.0",
        description: `
          <p><strong>11/09/2025</strong></p>
          <p>1. The Barcode module has been added to the Admin menu.</p>
          <p>2. You can now create barcode templates using this module.</p>
          <p>3. The print functionality supports generating barcodes and printing RFID data.</p>
        `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Logesh T",
        created_at: /* @__PURE__ */ new Date("2025-09-11 10:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "7.2.1",
        description: `
          <p><strong>12/09/2025</strong></p>
          <p>1. Implemented a date field and dropdown in dashboard component.</p>
          <p>2. Implemented a date range filter for the dashboard data.</p>
        `,
        is_frontend_changed: true,
        is_backend_changed: false,
        is_database_changed: false,
        developed_by: "Kharthie Ramakrishnan",
        created_at: /* @__PURE__ */ new Date("2025-09-12 10:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "7.2.2",
        description: `
          <p><strong>17/09/2025</strong></p>
          <p>1. Implemented a dynamic translate in label and placeholder in form_builder_module (forms).</p>
          <p>2. Passing the key inside the label and placeholder in form_information json.</p>
          <p>3. Implemented a dynamic translate using hbp_translate in static_page_builder_module (Details Page).</p>
          <p>4. Passing the key inside the static_page_builder_module HTML.</p>
        `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: false,
        developed_by: "Kharthie Ramakrishnan",
        created_at: /* @__PURE__ */ new Date("2025-09-17 10:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "7.2.3",
        description: `
          <p><strong>08/10/2025</strong></p>
          <p>1. Implemented AI Conversion option in Grid builder module and Form builder module - query information Icon.</p>
          <p>2. For JSON to query and query to JSON Conversion.</p>
        `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: false,
        developed_by: "Kharthie Ramakrishnan",
        created_at: /* @__PURE__ */ new Date("2025-10-08 10:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "7.2.4",
        description: `
          <p><strong>10/10/2025</strong></p>
          <p>1. Fixed user role permission issue.</p>
          <p>2. Implemented filter-based export functionality in Export Template module.</p>
          <p>3. Updated search filter button design and added loader functionality during search.</p>
        `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: false,
        developed_by: "Rajkumar Shanmugavel",
        created_at: /* @__PURE__ */ new Date("2025-10-10 18:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "7.2.5",
        description: `
          <p><strong>15/10/2025</strong></p>
          <p>1. Role based login.</p>
          <p>2. convert field_name in master_entity_line_item as text field.</p>
        `,
        is_frontend_changed: false,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Mithilesh Krishna S",
        created_at: /* @__PURE__ */ new Date("2025-10-15 18:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "7.2.6",
        description: `
          <p><strong>15/10/2025</strong></p>
          <p>1. Implement Preview option in master entity for grid_builder_module.</p>
          <p>2. Need to work on popup_details , popup_add and popup_edit inside the preview option.</p>
        `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: false,
        developed_by: "Kharthie Ramakrishnan",
        created_at: /* @__PURE__ */ new Date("2025-10-15 18:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "7.2.7",
        description: `
          <p><strong>21/10/2025</strong></p>
          <p>1. Configuration encryption implemented</p>
        `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: false,
        developed_by: "Rajkumar Shanmugavel",
        created_at: /* @__PURE__ */ new Date("2025-10-21 18:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "7.2.8",
        description: `
          <p><strong>24/10/2025</strong></p>
          <p>1. Implement queries with message in data import</p>
        `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: false,
        developed_by: "Rajkumar Shanmugavel",
        created_at: /* @__PURE__ */ new Date("2025-10-24 18:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "major",
        version: "8.0.0",
        description: `
          <p><strong>11/11/2025</strong></p>
          <p>1. Enhanced the Frontend UI of the repeat table component by implementing a flex column layout.</p>
          <p>2. Improved the Backend execute transaction logic to support raw queries, enabling conditional data handling for CRUD operations using [[[query with $placeholders]]].</p>
          <p>3. Refined the Backend sanitize logic to replace undefined and empty string values with NULL.</p>
          <p>4. Enhanced the Backend sanitize logic to automatically correct SQL syntax for functions such as CASE, NULLIF, TRIM, GREATEST, LEAST, CONCAT, COALESCE, and various date/time functions.</p>
          <p>5. Improved the Frontend placeholder replacement logic to handle nested placeholders and correctly update line item placeholders.</p>
        `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: false,
        developed_by: "Logesh T",
        created_at: /* @__PURE__ */ new Date("2025-11-11 18:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "8.0.1",
        description: `
          <p><strong>12/11/2025</strong></p>
          <p>1. Updated grid-level custom HTML content rendering to support enhanced dynamic field evaluations and ternary-style expressions.</p>
          <p>2. Included child grid access control within user role permissions to ensure consistent visibility and authorization handling across nested grids.</p>
        `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: false,
        developed_by: "Rajkumar Shanmugavel",
        created_at: /* @__PURE__ */ new Date("2025-11-12 18:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "8.0.2",
        description: `
          <p><strong>18/11/2025</strong></p>
          <p>1. Fixed the query builder issue (unique value error).</p>
        `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: false,
        developed_by: "Logesh T",
        created_at: /* @__PURE__ */ new Date("2025-11-18 18:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "8.0.3",
        description: `
          <p><strong>20/11/2025</strong></p>
          <p>1. Cron grid changes with DB backup implemented.</p>
          <p>2. Notification menu permissions corrected.</p>
        `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Rajkumar Shanmugavel",
        created_at: /* @__PURE__ */ new Date("2025-11-20 18:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "8.0.4",
        description: `
          <p><strong>20/11/2025</strong></p>
          <p>1. Included MQTT configuration in the global configurations.</p>
        `,
        is_frontend_changed: false,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Logesh T",
        created_at: /* @__PURE__ */ new Date("2025-11-20 18:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "major",
        version: "9.0.0",
        description: `
          <p><strong>03/12/2025</strong></p>
          <p>1. Export data using PDF Template.</p>
          <p>2. Integrated MQTT logic.</p>
          <p>3. Updated [[[]]] into [#[]#] in placeholder replacement logic.</p>
          <p>4. Fixed the seeder issue for caurosel template.</p>
          <p>5. Fixed the configuration schema config_value column length issue.</p>
          <p>6. Approval process trigger drop and create issue.</p>
          <p>7. Frontend - select-form-db uuid issue fixed.</p>
          <p>8. Frontend - session_id, unique_id replacement logic issue fixed.</p>
          <p>9. Frontend - duplicate table name attachement in select-from-db list api call issue fixed.</p>
        `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Logesh T",
        created_at: /* @__PURE__ */ new Date("2025-12-03 18:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "9.0.1",
        description: `
          <p><strong>05/12/2025</strong></p>
          <p>1. Updated the package.json to use js file instead of ts files to execute the scripts.</p>
          <p>2. Updated the tsconfig.json, prepare-dist-files.js, minify.js with ES2020 to fix the build issue.</p>
        `,
        is_frontend_changed: false,
        is_backend_changed: true,
        is_database_changed: false,
        developed_by: "Logesh T",
        created_at: /* @__PURE__ */ new Date("2025-12-05 18:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "9.0.2",
        description: `
          <p><strong>08/12/2025</strong></p>
          <p>1. PDF template shcema changes with prefix as pdf_.</p>
          <p>2. Backend: language translation issue fix.</p>
        `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Logesh T",
        created_at: /* @__PURE__ */ new Date("2025-12-08 18:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "9.0.3",
        description: `
          <p><strong>09/12/2025</strong></p>
          <p>1. PDF template shcema updation in export_template model using pdf_configurations field and UI updated.</p>
          <p>2. Trusted proxy issue fixed in index.ts file</p>
          <p>3. Updated the debug as false in Fileupload middleware to avoid getting repeated error logs.</p>
          <p>4. Updated the user login restriction using from_soruce property in login api (1-web, 2-mobile).</p>
        `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Logesh T",
        created_at: /* @__PURE__ */ new Date("2025-12-09 18:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "9.0.4",
        description: `
          <p><strong>09/12/2025</strong></p>
          <p>1. Implemented the grid system in the Dashboard page.</p>
        `,
        is_frontend_changed: true,
        is_backend_changed: false,
        is_database_changed: false,
        developed_by: "Rajkumar Shanmugavel",
        created_at: /* @__PURE__ */ new Date("2025-12-09 19:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "minor",
        version: "9.1.0",
        description: `
          <p><strong>24/12/2025</strong></p>
          <p>1. Replaced the approval workflow id with the approval workflow slug in Approval workflow assignment table.</p>
          <p>2. Updated the approval workflow triggers and UI with the notification changes and replaced the approval workflow id with the  approval workflow slug.</p>
          <p>3. Updated the cron job endpoints with the 'api/' and updated the logic for starting specific cron jobs in backend.</p>
        `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Logesh T",
        created_at: /* @__PURE__ */ new Date("2025-12-24 19:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "minor",
        version: "9.2.0",
        description: `
          <p><strong>29/12/2025</strong></p>
          <p>1. Removed approval process and policy flow from user screen in Tools menu.</p>
          <p>2. Created separate screen for approval process and policy flow using users menu in Exmaples under Documentation menu.</p>
        `,
        is_frontend_changed: false,
        is_backend_changed: true,
        is_database_changed: false,
        developed_by: "Logesh T",
        created_at: /* @__PURE__ */ new Date("2025-12-29 19:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "7.2.1",
        description: `
          <p><strong>05/01/2026</strong></p>
          <p>1. Implemented scheduled import process with validation for start and end date & time.</p>
          <p>2. Added tracking for process start time, end time, and expected completion time.</p>
          <p>3. Integrated email job process for scheduled import status notifications.</p>
        `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Rajkumar Shanmugavel",
        created_at: /* @__PURE__ */ new Date("2026-01-05 13:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "minor",
        version: "7.3.0",
        description: `
          <p><strong>13/01/2026</strong></p>
          <p>1. Implemented Individual Record based PDF Export logic and added example in the Documentation section for user list screen.</p>
          <p>2. Fixed the form contoller issue in the Export template component in Frontend.</p>
          <p>3. Removed the filter condition in the Email template assignment grid to fetch all type of processes.</p>
          <p>4. Dashboard route update issue fixes.</p>
          <p>5. Master Entity grid UI width issue fixes.</p>
          <p>6. OTP process table schema updation with purpose and type.</p>
        `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Logesh T",
        created_at: /* @__PURE__ */ new Date("2026-01-13 13:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "7.3.1",
        description: `     <p><strong>20/01/2026</strong></p>     <p>1. Enhancement: Added <code>import_template_id</code> tracking for both direct import and scheduled import processes. Additionally, introduced <code>direct_import_details</code> table to improve tracking and auditing of direct import executions.</p>     <p>2. Bug Fix: Fixed configuration value collection logic by properly combining <code>configurations</code> and <code>user_configurations</code> with correct override handling.</p>
          `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Rajkumar Shanmugavel",
        created_at: /* @__PURE__ */ new Date("2026-01-20 13:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "major",
        version: "8.0.0",
        description: `
          <p><strong>21/01/2026</strong></p>
          <p>1. Notification type has been added Notification Grid and form screens.</p>  
          <p>2. Updated the  Notification CRON to support sending SMS.</p>
          <p>3. SMS related configuration has been added with empty values in app_configurations table.</p>
          <p>4. Fixed the tag issue in the Notification Template assignment screen.</p>
          <p>5. Updated the Password reset to insert notification process slug in the OTP table.</p>
          <p>6. Updated the slug name for all notification processes in the frontend and backend.</p>
          <p>7. Removed the OTP process table and purpose column from the OTP table.</p>
          <p>8. Included Verify OTP functionality in Password Reset api and added verified_at column in the OTP table.</p>
          <p>9. Update the lcppg_vecotr script to use pg-vector-17 version docker image to avoid conflict while restoring server db backup file in local.</p>
        `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Logesh T",
        created_at: /* @__PURE__ */ new Date("2026-01-21 13:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "8.0.1",
        description: `
          <p><strong>22/01/2026</strong></p>
          <p>1. Updated the configuration and user configuration seeder file to support updating the app configuration and user configuration tables.</p>  
        `,
        is_frontend_changed: false,
        is_backend_changed: true,
        is_database_changed: false,
        developed_by: "Logesh T",
        created_at: /* @__PURE__ */ new Date("2026-01-22 13:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "8.0.2",
        description: `
          <p><strong>23/01/2026</strong></p>
          <p>1. Added the helper logic in helper.ts file to format the ip address which is fetched from the request and updated the login api.</p>  
          <p>2. Moved the whatsapp settings menu to admin menu from tools menu.</p>
          <p>3. Updated the user-roles and department seeder in the app-seed folder to avoid error while looping empty json and array object.</p>
          <p>4. Updated the language content for notification grid and form labels.</p>
          <p>5. Updated the menu name from email to notification in the tools menu.</p>
        `,
        is_frontend_changed: false,
        is_backend_changed: true,
        is_database_changed: false,
        developed_by: "Logesh T",
        created_at: /* @__PURE__ */ new Date("2026-01-22 13:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "8.0.3",
        description: `     <p><strong>30/01/2026</strong></p>     <p>1. Enhancement: Added <code>filtered_columns</code> in policies.</p>
          `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Rajkumar Shanmugavel",
        created_at: /* @__PURE__ */ new Date("2026-01-30 16:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "minor",
        version: "8.1.0",
        description: `<p><strong>03/02/2026</strong></p>     
        <p>1.Created Refresh token api to update the token and localstorage values.</p>
        <p>2.Created Refresh token alone api to get refreshed token alone to maintain user session.</p>
          `,
        is_frontend_changed: false,
        is_backend_changed: true,
        is_database_changed: false,
        developed_by: "Logesh T",
        created_at: /* @__PURE__ */ new Date("2026-02-03 16:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "8.1.1",
        description: `<p><strong>10/02/2026</strong></p>     
        <p>1.Advance filter with IN and Not In conditions has been added.</p>
        <p>2.Enum type filter has been added, to use this you need to set the enum_values in the grid_builder_module entity.</p>
          `,
        is_frontend_changed: true,
        is_backend_changed: false,
        is_database_changed: true,
        developed_by: "Kartick N",
        created_at: /* @__PURE__ */ new Date("2026-02-10 16:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "8.1.2",
        description: `<p><strong>19/02/2026</strong></p>     
        <p>1. Bug fixing and seeder updations in the get_grid_item, multiple_records, view_user_information procedures, email template seeders, configuration seeder.</p>
        <p>2.Bug Fixing and UI updations in autocomplete and autocomplete-form dropdown components, header component, form-builder component in frontend.</p>
          `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Logesh T",
        created_at: /* @__PURE__ */ new Date("2026-02-19 16:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "8.1.3",
        description: `<p><strong>20/02/2026</strong></p>
  <p>1. User Insights example grid updated with Status and Process Status as select boxes along with seeder updates.</p>
  <p>2. Clipboard functionality updated to remove and apply new model; master entity add/edit enhanced with information icon and HTML content support.</p>
  <p>3. Implemented html_content and enum_values language translations with placeholders.</p>
  <p>4. HTML content editor improvements: aligned information content within the same editor and enabled edit popup click support.</p>
  <p>5. Language translation support added for IN / NOT IN conditions.</p>
  <p>6. Advanced filter enhancements: Clear Filter converted to button and standardized font size applied across all fields.</p>`,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Rajkumar Shanmugavel",
        created_at: /* @__PURE__ */ new Date("2026-02-20 16:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "8.1.4",
        description: `<p><strong>25/02/2026</strong></p>
  <p>1. Reduced font size to small for ng-select options in Advanced Filter.</p>
  <p>2. Applied gparam and session_id values for CTE query in GRID.</p>
  <p>3. Removed gparam values while generating PDF/Excel normal export.</p>
  <p>4. Implemented multiple parameters for router link.</p>
  <p>5. Changed column design for Import Job line items and updated date-time format with loading issue fix.</p>`,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: false,
        developed_by: "Rajkumar Shanmugavel",
        created_at: /* @__PURE__ */ new Date("2026-02-25 16:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "8.1.5",
        description: `<p><strong>03/03/2026</strong></p>
  <p>1. Implemented configuration-based selection in Advanced Filter.</p>
  <p>2. Introduced application dropdown configuration in the Configuration page.</p>
  <p>3. Updated backend seeder with new configuration values.</p>
  <p>4. Collected configuration-wise select box JSON code in Datatable component.</p>`,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Rajkumar Shanmugavel",
        created_at: /* @__PURE__ */ new Date("2026-03-03 10:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "9.2.1",
        description: `<p><strong>Frontend Changes:</strong></p><ol><li>Implemented <code>header_entity_id</code> &amp; <code>footer_entity_id</code> in the Master Entity component.</li><li>Used <code>show_column_search_keys</code> &amp; <code>show_common_search_keys</code> in configuration and controlled them in the grid.</li></ol><p><strong>Backend Changes:</strong></p><ol><li>Implemented <code>show_column_search_keys</code> &amp; <code>show_common_search_keys</code> in the configuration seeder.</li><li>Collected <code>header_entity_id</code> &amp; <code>footer_entity_id</code> from entities and returned them through the common service.</li></ol><p><strong>Database Changes:</strong></p><ol><li>Added columns <code>header_entity_id</code> &amp; <code>footer_entity_id</code> to the <code>master_entities</code> table.</li></ol>`,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Rajkumar Shanmugavel",
        created_at: /* @__PURE__ */ new Date("2026-03-09 10:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "patch",
        version: "9.2.2",
        description: `<p><strong>Frontend Changes:</strong></p>
<ol>
  <li>
    Implemented filter saving functionality in <code>datatable</code>, <code>master list component</code>, <code>background jobs</code>, and <code>cron jobs</code>.
  </li>
  <li>
    Stored and reused filter settings such as <code>common search</code>, <code>column search</code>, <code>pagination</code>, and <code>visible columns</code>.
  </li>
  <li>
    Used <code>localStorage</code> to apply saved filter configurations efficiently.
  </li>
</ol>

<p><strong>Backend Changes:</strong></p>
<ol>
  <li>
    Implemented API logic to retrieve logged-in user details.
  </li>
  <li>
    Returned <code>user_search_details</code> to the frontend through the API for applying saved filter configurations.
  </li>
</ol>

<p><strong>Database Changes:</strong></p>
<ol>
  <li>
    Created <code>user_search_configurations</code> table to store user-specific search configurations including view name, default view, and search values.
  </li>
  <li>
    Added unique constraints for <code>company_id</code>, <code>user_id</code>, <code>entity_slug</code>, and <code>view_name</code> to ensure unique saved views per user and entity.
  </li>
</ol>`,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Rajkumar Shanmugavel",
        created_at: /* @__PURE__ */ new Date("2026-03-11 21:28:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "minor",
        version: "9.3.0",
        description: `<p><strong>12/03/2026</strong></p>
          <p>1. Added a new table tree_builder_examples and introduced the Tree View module. Also added an example screen in the documentation section named \u201CTree Builder Example\u201D, similar to the Grid Builder module.</p>
          <p>2. Introduced base_app_url in the Configuration page and used the base_app_url in the frontend to fix the new tab navigation issue when ctrl + enter is applied on action icons.</p>
          <p>3. Added a export_template_file_name column in the master_entities table to donwload excel/pdf file based on the export_template_file_name in common export and export job.</p>
          `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Logesh T",
        created_at: /* @__PURE__ */ new Date("2026-03-12 10:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "minor",
        version: "9.4.0",
        description: `<p><strong>25/03/2026</strong></p>
          <p>1. Updated the procedures: get_grid_items, replace_placeholder_variables, replace_values, build_includes1 to fix the json data and operator related issues.</p>
          <p>2. Updated the user_information view to select user's uuid column.</p>
          <p>3. Updated the application dropdown config in configurations json file with the user's name, email and role enum dropdowns.</p>
          <p>4. Fixed the url end point issue in the User Insights example component in the menu items seeder.</p>
          <p>5. Fixed the validation issue in the common validator file for filtered_columns and attached_policies fields in IMultipleRecordsParam interface.</p>
          <p>6. Updated the datatable component to handle gparams related issues in header and footer static pages and implemented the additional filter property, gparams, policies in enum_filter logic.</p>
          <p>7. Fixed the data mutation issue in the enuym_filter logic in datatable component.</p>
          <p>8. Included default value for status field in formly config file and now able to use status field in the repeat table component.</p>
          <p>9. Updated the data replacement logic in form builder component to replace placeholders anywhere in the provided data where it contains '$' symbol.</p>
          <p>10. Updated the master list component to pass parent params and gparams to view details and popup details (static page)component to show data respective to the filters applied on the parent grid.</p>
          `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Logesh T",
        created_at: /* @__PURE__ */ new Date("2026-03-12 10:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "minor",
        version: "9.5.0",
        description: `<p><strong>01/04/2026</strong></p>
          <p>1. Export module wise Master entities, Menu items, Permissions, Configurations, Masters, Users, Language contents & etc.</p>
          <p>2. Export single master entity details.</p>
          <p>3. Import all the exported entities.</p>
          `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Karthick N",
        created_at: /* @__PURE__ */ new Date("2026-04-01 10:00:00.000+05:30")
      },
      {
        type: "lcp",
        version_type: "minor",
        version: "9.6.0",
        description: `<p><strong>10/04/2026</strong></p>
          <p>1. Added Notifications in UI (SMS, Email, Whatsapp, Push Notification).</p>
          <p>2. Added Configurations for websocket, firebase for push notifications</p>
          `,
        is_frontend_changed: true,
        is_backend_changed: true,
        is_database_changed: true,
        developed_by: "Manoowranjith Jaganathan",
        created_at: /* @__PURE__ */ new Date("2026-04-10 10:00:00.000+05:30")
      }
    ];
    for (const appVersion of appVersions) {
      await createOrUpdateAppVersion(company_id, appVersion, user.id, utcNow);
    }
    console.log("App Versions seeder executed successfully.");
  } catch (error) {
    console.error(`Error in appVersionsSeeder: ${error}`);
    throw error;
  }
}
async function createOrUpdateAppVersion(company_id, appVersion, created_by, utcNow) {
  let existingVersion = await prisma.appversions.findFirst({
    where: {
      company_id,
      type: appVersion.type,
      version_type: appVersion.type,
      version: appVersion.version
    }
  });
  if (!existingVersion) {
    const newVersion = await prisma.appversions.create({
      data: {
        company_id,
        type: appVersion.type,
        version_type: appVersion.version_type,
        version: appVersion.version,
        description: appVersion.description,
        is_frontend_changed: appVersion.is_frontend_changed,
        is_backend_changed: appVersion.is_backend_changed,
        is_database_changed: appVersion.is_database_changed,
        developed_by: appVersion.developed_by,
        created_at: appVersion.created_at,
        created_by
      }
    });
    console.log(`LCP and App version created: ${newVersion.version}`);
  } else {
    await prisma.appversions.update({
      where: { id: existingVersion.id },
      data: {
        description: appVersion.description,
        is_frontend_changed: appVersion.is_frontend_changed,
        is_backend_changed: appVersion.is_backend_changed,
        is_database_changed: appVersion.is_database_changed,
        developed_by: appVersion.developed_by,
        created_at: appVersion.created_at,
        updated_by: created_by,
        updated_at: utcNow
      }
    });
    console.log(`LCP and App version updated: ${existingVersion.version}`);
  }
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  appVersionsSeeder
});
