{
  "version": "6",
  "dialect": "sqlite",
  "id": "b5e41bae-5459-4281-a13d-4843c6d5f3d1",
  "prevId": "315d9096-1225-43c1-a053-182c153b5373",
  "tables": {
    "account": {
      "name": "account",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": false
        },
        "account_id": {
          "name": "account_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "provider_id": {
          "name": "provider_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "access_token": {
          "name": "access_token",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "refresh_token": {
          "name": "refresh_token",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "id_token": {
          "name": "id_token",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "access_token_expires_at": {
          "name": "access_token_expires_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "refresh_token_expires_at": {
          "name": "refresh_token_expires_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "scope": {
          "name": "scope",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "password": {
          "name": "password",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "created_at": {
          "name": "created_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(unixepoch() * 1000)"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(unixepoch() * 1000)"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "account_user_id_user_id_fk": {
          "name": "account_user_id_user_id_fk",
          "tableFrom": "account",
          "tableTo": "user",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "cliente": {
      "name": "cliente",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": false
        },
        "profilo_id": {
          "name": "profilo_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "tipo": {
          "name": "tipo",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "denominazione": {
          "name": "denominazione",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "nome": {
          "name": "nome",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "cognome": {
          "name": "cognome",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "partita_iva": {
          "name": "partita_iva",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "id_paese": {
          "name": "id_paese",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "codice_fiscale": {
          "name": "codice_fiscale",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "indirizzo": {
          "name": "indirizzo",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "civico": {
          "name": "civico",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "cap": {
          "name": "cap",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "comune": {
          "name": "comune",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "provincia": {
          "name": "provincia",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "nazione": {
          "name": "nazione",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "'IT'"
        },
        "codice_destinatario": {
          "name": "codice_destinatario",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "pec": {
          "name": "pec",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "email": {
          "name": "email",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "telefono": {
          "name": "telefono",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "note": {
          "name": "note",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "lingua": {
          "name": "lingua",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "'it'"
        },
        "tariffa_ora_cent": {
          "name": "tariffa_ora_cent",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "tariffa_giorno_cent": {
          "name": "tariffa_giorno_cent",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "tariffa_riservata_giorno_cent": {
          "name": "tariffa_riservata_giorno_cent",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "regole_scrittura": {
          "name": "regole_scrittura",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "link_email": {
          "name": "link_email",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "archiviato": {
          "name": "archiviato",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": false
        },
        "created_at": {
          "name": "created_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(unixepoch() * 1000)"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(unixepoch() * 1000)"
        }
      },
      "indexes": {
        "cliente_profilo_idx": {
          "name": "cliente_profilo_idx",
          "columns": [
            "profilo_id"
          ],
          "isUnique": false
        }
      },
      "foreignKeys": {
        "cliente_profilo_id_profilo_id_fk": {
          "name": "cliente_profilo_id_profilo_id_fk",
          "tableFrom": "cliente",
          "tableTo": "profilo",
          "columnsFrom": [
            "profilo_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "contatto": {
      "name": "contatto",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": false
        },
        "profilo_id": {
          "name": "profilo_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "cliente_id": {
          "name": "cliente_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "progetto_id": {
          "name": "progetto_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "nome": {
          "name": "nome",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "ruolo": {
          "name": "ruolo",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "email": {
          "name": "email",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "telefono": {
          "name": "telefono",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "lingua": {
          "name": "lingua",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "note": {
          "name": "note",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "origine": {
          "name": "origine",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "'web'"
        },
        "archiviato": {
          "name": "archiviato",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": false
        },
        "created_at": {
          "name": "created_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(unixepoch() * 1000)"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(unixepoch() * 1000)"
        }
      },
      "indexes": {
        "contatto_cliente_idx": {
          "name": "contatto_cliente_idx",
          "columns": [
            "cliente_id"
          ],
          "isUnique": false
        },
        "contatto_progetto_idx": {
          "name": "contatto_progetto_idx",
          "columns": [
            "progetto_id"
          ],
          "isUnique": false
        }
      },
      "foreignKeys": {
        "contatto_profilo_id_profilo_id_fk": {
          "name": "contatto_profilo_id_profilo_id_fk",
          "tableFrom": "contatto",
          "tableTo": "profilo",
          "columnsFrom": [
            "profilo_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "contatto_cliente_id_cliente_id_fk": {
          "name": "contatto_cliente_id_cliente_id_fk",
          "tableFrom": "contatto",
          "tableTo": "cliente",
          "columnsFrom": [
            "cliente_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "contatto_progetto_id_progetto_id_fk": {
          "name": "contatto_progetto_id_progetto_id_fk",
          "tableFrom": "contatto",
          "tableTo": "progetto",
          "columnsFrom": [
            "progetto_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "evento_sdi": {
      "name": "evento_sdi",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": false
        },
        "fattura_id": {
          "name": "fattura_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "tipo": {
          "name": "tipo",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "descrizione": {
          "name": "descrizione",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "file": {
          "name": "file",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "created_at": {
          "name": "created_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(unixepoch() * 1000)"
        }
      },
      "indexes": {
        "evento_fattura_idx": {
          "name": "evento_fattura_idx",
          "columns": [
            "fattura_id"
          ],
          "isUnique": false
        }
      },
      "foreignKeys": {
        "evento_sdi_fattura_id_fattura_id_fk": {
          "name": "evento_sdi_fattura_id_fattura_id_fk",
          "tableFrom": "evento_sdi",
          "tableTo": "fattura",
          "columnsFrom": [
            "fattura_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "fattura": {
      "name": "fattura",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": false
        },
        "profilo_id": {
          "name": "profilo_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "cliente_id": {
          "name": "cliente_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "cliente_snapshot": {
          "name": "cliente_snapshot",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "tipo_documento": {
          "name": "tipo_documento",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "'TD01'"
        },
        "anno": {
          "name": "anno",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "numero": {
          "name": "numero",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "data": {
          "name": "data",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "causale_libera": {
          "name": "causale_libera",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "imponibile_cent": {
          "name": "imponibile_cent",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": 0
        },
        "cassa_cent": {
          "name": "cassa_cent",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": 0
        },
        "bollo_dovuto": {
          "name": "bollo_dovuto",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": false
        },
        "bollo_addebitato_cent": {
          "name": "bollo_addebitato_cent",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": 0
        },
        "totale_cent": {
          "name": "totale_cent",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": 0
        },
        "modalita_pagamento": {
          "name": "modalita_pagamento",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "'MP05'"
        },
        "scadenza": {
          "name": "scadenza",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "stato": {
          "name": "stato",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "'bozza'"
        },
        "xml": {
          "name": "xml",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "nome_file": {
          "name": "nome_file",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "progressivo_invio": {
          "name": "progressivo_invio",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "identificativo_sdi": {
          "name": "identificativo_sdi",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "incassata_il": {
          "name": "incassata_il",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "fattura_collegata_id": {
          "name": "fattura_collegata_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "importata": {
          "name": "importata",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": false
        },
        "emessa_il": {
          "name": "emessa_il",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "created_at": {
          "name": "created_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(unixepoch() * 1000)"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(unixepoch() * 1000)"
        }
      },
      "indexes": {
        "fattura_numero_uq": {
          "name": "fattura_numero_uq",
          "columns": [
            "profilo_id",
            "tipo_documento",
            "anno",
            "numero"
          ],
          "isUnique": true
        },
        "fattura_profilo_anno_idx": {
          "name": "fattura_profilo_anno_idx",
          "columns": [
            "profilo_id",
            "anno"
          ],
          "isUnique": false
        }
      },
      "foreignKeys": {
        "fattura_profilo_id_profilo_id_fk": {
          "name": "fattura_profilo_id_profilo_id_fk",
          "tableFrom": "fattura",
          "tableTo": "profilo",
          "columnsFrom": [
            "profilo_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "fattura_cliente_id_cliente_id_fk": {
          "name": "fattura_cliente_id_cliente_id_fk",
          "tableFrom": "fattura",
          "tableTo": "cliente",
          "columnsFrom": [
            "cliente_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "lavoro": {
      "name": "lavoro",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": false
        },
        "profilo_id": {
          "name": "profilo_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "progetto_id": {
          "name": "progetto_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "richiesta_id": {
          "name": "richiesta_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "data": {
          "name": "data",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "descrizione_cliente": {
          "name": "descrizione_cliente",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "nota_interna": {
          "name": "nota_interna",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "unita": {
          "name": "unita",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "'h'"
        },
        "quantita_proposta_cent": {
          "name": "quantita_proposta_cent",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "quantita_riconosciuta_cent": {
          "name": "quantita_riconosciuta_cent",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "importo_forfait_cent": {
          "name": "importo_forfait_cent",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "tariffa_cent": {
          "name": "tariffa_cent",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": 0
        },
        "natura": {
          "name": "natura",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "'da_decidere'"
        },
        "stato": {
          "name": "stato",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "'proposto'"
        },
        "pagatore_id": {
          "name": "pagatore_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "fattura_id": {
          "name": "fattura_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "riferimenti": {
          "name": "riferimenti",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "origine": {
          "name": "origine",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "'web'"
        },
        "chiave": {
          "name": "chiave",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "archiviato": {
          "name": "archiviato",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": false
        },
        "created_at": {
          "name": "created_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(unixepoch() * 1000)"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(unixepoch() * 1000)"
        }
      },
      "indexes": {
        "lavoro_progetto_idx": {
          "name": "lavoro_progetto_idx",
          "columns": [
            "progetto_id"
          ],
          "isUnique": false
        },
        "lavoro_stato_idx": {
          "name": "lavoro_stato_idx",
          "columns": [
            "profilo_id",
            "stato"
          ],
          "isUnique": false
        },
        "lavoro_chiave_uq": {
          "name": "lavoro_chiave_uq",
          "columns": [
            "profilo_id",
            "chiave"
          ],
          "isUnique": true
        }
      },
      "foreignKeys": {
        "lavoro_profilo_id_profilo_id_fk": {
          "name": "lavoro_profilo_id_profilo_id_fk",
          "tableFrom": "lavoro",
          "tableTo": "profilo",
          "columnsFrom": [
            "profilo_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "lavoro_progetto_id_progetto_id_fk": {
          "name": "lavoro_progetto_id_progetto_id_fk",
          "tableFrom": "lavoro",
          "tableTo": "progetto",
          "columnsFrom": [
            "progetto_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "lavoro_richiesta_id_richiesta_id_fk": {
          "name": "lavoro_richiesta_id_richiesta_id_fk",
          "tableFrom": "lavoro",
          "tableTo": "richiesta",
          "columnsFrom": [
            "richiesta_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        },
        "lavoro_pagatore_id_cliente_id_fk": {
          "name": "lavoro_pagatore_id_cliente_id_fk",
          "tableFrom": "lavoro",
          "tableTo": "cliente",
          "columnsFrom": [
            "pagatore_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        },
        "lavoro_fattura_id_fattura_id_fk": {
          "name": "lavoro_fattura_id_fattura_id_fk",
          "tableFrom": "lavoro",
          "tableTo": "fattura",
          "columnsFrom": [
            "fattura_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "limite": {
      "name": "limite",
      "columns": {
        "chiave": {
          "name": "chiave",
          "type": "text",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": false
        },
        "conteggio": {
          "name": "conteggio",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "scade_il": {
          "name": "scade_il",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "nota": {
      "name": "nota",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": false
        },
        "profilo_id": {
          "name": "profilo_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "progetto_id": {
          "name": "progetto_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "cliente_id": {
          "name": "cliente_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "tipo": {
          "name": "tipo",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "'fatto'"
        },
        "data": {
          "name": "data",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "testo": {
          "name": "testo",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "origine": {
          "name": "origine",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "'web'"
        },
        "chiave": {
          "name": "chiave",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "archiviato": {
          "name": "archiviato",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": false
        },
        "created_at": {
          "name": "created_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(unixepoch() * 1000)"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(unixepoch() * 1000)"
        }
      },
      "indexes": {
        "nota_progetto_idx": {
          "name": "nota_progetto_idx",
          "columns": [
            "progetto_id"
          ],
          "isUnique": false
        },
        "nota_chiave_uq": {
          "name": "nota_chiave_uq",
          "columns": [
            "profilo_id",
            "chiave"
          ],
          "isUnique": true
        }
      },
      "foreignKeys": {
        "nota_profilo_id_profilo_id_fk": {
          "name": "nota_profilo_id_profilo_id_fk",
          "tableFrom": "nota",
          "tableTo": "profilo",
          "columnsFrom": [
            "profilo_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "nota_progetto_id_progetto_id_fk": {
          "name": "nota_progetto_id_progetto_id_fk",
          "tableFrom": "nota",
          "tableTo": "progetto",
          "columnsFrom": [
            "progetto_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "nota_cliente_id_cliente_id_fk": {
          "name": "nota_cliente_id_cliente_id_fk",
          "tableFrom": "nota",
          "tableTo": "cliente",
          "columnsFrom": [
            "cliente_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "profilo": {
      "name": "profilo",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": false
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "denominazione": {
          "name": "denominazione",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "nome": {
          "name": "nome",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "cognome": {
          "name": "cognome",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "titolo": {
          "name": "titolo",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "partita_iva": {
          "name": "partita_iva",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "codice_fiscale": {
          "name": "codice_fiscale",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "indirizzo": {
          "name": "indirizzo",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "civico": {
          "name": "civico",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "cap": {
          "name": "cap",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "comune": {
          "name": "comune",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "provincia": {
          "name": "provincia",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "email": {
          "name": "email",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "telefono": {
          "name": "telefono",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "iban": {
          "name": "iban",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "beneficiario": {
          "name": "beneficiario",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "regime_fiscale": {
          "name": "regime_fiscale",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "'RF19'"
        },
        "cassa_tipo": {
          "name": "cassa_tipo",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "cassa_aliquota_bp": {
          "name": "cassa_aliquota_bp",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": 400
        },
        "riaddebito_bollo": {
          "name": "riaddebito_bollo",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": true
        },
        "modalita_pagamento": {
          "name": "modalita_pagamento",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "'MP05'"
        },
        "giorni_scadenza": {
          "name": "giorni_scadenza",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": 0
        },
        "coefficiente_redditivita": {
          "name": "coefficiente_redditivita",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": 78
        },
        "aliquota_sostitutiva": {
          "name": "aliquota_sostitutiva",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": 15
        },
        "note_pdf": {
          "name": "note_pdf",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "modulo_lavoro": {
          "name": "modulo_lavoro",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": false
        },
        "tariffa_ora_cent": {
          "name": "tariffa_ora_cent",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": 3000
        },
        "tariffa_giorno_cent": {
          "name": "tariffa_giorno_cent",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": 24000
        },
        "contatore_invio": {
          "name": "contatore_invio",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": 0
        },
        "created_at": {
          "name": "created_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(unixepoch() * 1000)"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(unixepoch() * 1000)"
        }
      },
      "indexes": {
        "profilo_user_id_unique": {
          "name": "profilo_user_id_unique",
          "columns": [
            "user_id"
          ],
          "isUnique": true
        }
      },
      "foreignKeys": {
        "profilo_user_id_user_id_fk": {
          "name": "profilo_user_id_user_id_fk",
          "tableFrom": "profilo",
          "tableTo": "user",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "progetto": {
      "name": "progetto",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": false
        },
        "profilo_id": {
          "name": "profilo_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "slug": {
          "name": "slug",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "nome": {
          "name": "nome",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "descrizione": {
          "name": "descrizione",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "cliente_finale_id": {
          "name": "cliente_finale_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "pagatore_id": {
          "name": "pagatore_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "intermediario_id": {
          "name": "intermediario_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "utilizzatore": {
          "name": "utilizzatore",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "percorsi": {
          "name": "percorsi",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "'[]'"
        },
        "tariffa_ora_cent": {
          "name": "tariffa_ora_cent",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "tariffa_giorno_cent": {
          "name": "tariffa_giorno_cent",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "tariffa_riservata_giorno_cent": {
          "name": "tariffa_riservata_giorno_cent",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "unita_preferita": {
          "name": "unita_preferita",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "'gg'"
        },
        "criterio_extra": {
          "name": "criterio_extra",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "garanzia_fino_al": {
          "name": "garanzia_fino_al",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "regole_scrittura": {
          "name": "regole_scrittura",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "stato": {
          "name": "stato",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "'attivo'"
        },
        "note": {
          "name": "note",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "archiviato": {
          "name": "archiviato",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": false
        },
        "created_at": {
          "name": "created_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(unixepoch() * 1000)"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(unixepoch() * 1000)"
        }
      },
      "indexes": {
        "progetto_slug_uq": {
          "name": "progetto_slug_uq",
          "columns": [
            "profilo_id",
            "slug"
          ],
          "isUnique": true
        }
      },
      "foreignKeys": {
        "progetto_profilo_id_profilo_id_fk": {
          "name": "progetto_profilo_id_profilo_id_fk",
          "tableFrom": "progetto",
          "tableTo": "profilo",
          "columnsFrom": [
            "profilo_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "progetto_cliente_finale_id_cliente_id_fk": {
          "name": "progetto_cliente_finale_id_cliente_id_fk",
          "tableFrom": "progetto",
          "tableTo": "cliente",
          "columnsFrom": [
            "cliente_finale_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        },
        "progetto_pagatore_id_cliente_id_fk": {
          "name": "progetto_pagatore_id_cliente_id_fk",
          "tableFrom": "progetto",
          "tableTo": "cliente",
          "columnsFrom": [
            "pagatore_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        },
        "progetto_intermediario_id_cliente_id_fk": {
          "name": "progetto_intermediario_id_cliente_id_fk",
          "tableFrom": "progetto",
          "tableTo": "cliente",
          "columnsFrom": [
            "intermediario_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "promemoria": {
      "name": "promemoria",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": false
        },
        "profilo_id": {
          "name": "profilo_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "progetto_id": {
          "name": "progetto_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "cliente_id": {
          "name": "cliente_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "tipo": {
          "name": "tipo",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "'attivita'"
        },
        "testo": {
          "name": "testo",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "data": {
          "name": "data",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "fatto_il": {
          "name": "fatto_il",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "origine": {
          "name": "origine",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "'web'"
        },
        "chiave": {
          "name": "chiave",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "archiviato": {
          "name": "archiviato",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": false
        },
        "created_at": {
          "name": "created_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(unixepoch() * 1000)"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(unixepoch() * 1000)"
        }
      },
      "indexes": {
        "promemoria_profilo_idx": {
          "name": "promemoria_profilo_idx",
          "columns": [
            "profilo_id"
          ],
          "isUnique": false
        },
        "promemoria_chiave_uq": {
          "name": "promemoria_chiave_uq",
          "columns": [
            "profilo_id",
            "chiave"
          ],
          "isUnique": true
        }
      },
      "foreignKeys": {
        "promemoria_profilo_id_profilo_id_fk": {
          "name": "promemoria_profilo_id_profilo_id_fk",
          "tableFrom": "promemoria",
          "tableTo": "profilo",
          "columnsFrom": [
            "profilo_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "promemoria_progetto_id_progetto_id_fk": {
          "name": "promemoria_progetto_id_progetto_id_fk",
          "tableFrom": "promemoria",
          "tableTo": "progetto",
          "columnsFrom": [
            "progetto_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "promemoria_cliente_id_cliente_id_fk": {
          "name": "promemoria_cliente_id_cliente_id_fk",
          "tableFrom": "promemoria",
          "tableTo": "cliente",
          "columnsFrom": [
            "cliente_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "registro": {
      "name": "registro",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": false
        },
        "profilo_id": {
          "name": "profilo_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "origine": {
          "name": "origine",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "entita": {
          "name": "entita",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "entita_id": {
          "name": "entita_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "progetto_id": {
          "name": "progetto_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "azione": {
          "name": "azione",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "dati": {
          "name": "dati",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "created_at": {
          "name": "created_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(unixepoch() * 1000)"
        }
      },
      "indexes": {
        "registro_profilo_idx": {
          "name": "registro_profilo_idx",
          "columns": [
            "profilo_id",
            "created_at"
          ],
          "isUnique": false
        },
        "registro_entita_idx": {
          "name": "registro_entita_idx",
          "columns": [
            "entita",
            "entita_id"
          ],
          "isUnique": false
        }
      },
      "foreignKeys": {
        "registro_profilo_id_profilo_id_fk": {
          "name": "registro_profilo_id_profilo_id_fk",
          "tableFrom": "registro",
          "tableTo": "profilo",
          "columnsFrom": [
            "profilo_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "richiesta": {
      "name": "richiesta",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": false
        },
        "profilo_id": {
          "name": "profilo_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "progetto_id": {
          "name": "progetto_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "direzione": {
          "name": "direzione",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "'cliente'"
        },
        "data": {
          "name": "data",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "canale": {
          "name": "canale",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "contatto_id": {
          "name": "contatto_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "sintesi": {
          "name": "sintesi",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "testo_originale": {
          "name": "testo_originale",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "classificazione": {
          "name": "classificazione",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "'da_decidere'"
        },
        "stato": {
          "name": "stato",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "'aperta'"
        },
        "attesa_da": {
          "name": "attesa_da",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "attesa_dal": {
          "name": "attesa_dal",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "scadenza": {
          "name": "scadenza",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "sollecito_il": {
          "name": "sollecito_il",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "online_il": {
          "name": "online_il",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "riferimenti": {
          "name": "riferimenti",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "origine": {
          "name": "origine",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "'web'"
        },
        "chiave": {
          "name": "chiave",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "archiviato": {
          "name": "archiviato",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": false
        },
        "created_at": {
          "name": "created_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(unixepoch() * 1000)"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(unixepoch() * 1000)"
        }
      },
      "indexes": {
        "richiesta_progetto_idx": {
          "name": "richiesta_progetto_idx",
          "columns": [
            "progetto_id"
          ],
          "isUnique": false
        },
        "richiesta_chiave_uq": {
          "name": "richiesta_chiave_uq",
          "columns": [
            "profilo_id",
            "chiave"
          ],
          "isUnique": true
        }
      },
      "foreignKeys": {
        "richiesta_profilo_id_profilo_id_fk": {
          "name": "richiesta_profilo_id_profilo_id_fk",
          "tableFrom": "richiesta",
          "tableTo": "profilo",
          "columnsFrom": [
            "profilo_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "richiesta_progetto_id_progetto_id_fk": {
          "name": "richiesta_progetto_id_progetto_id_fk",
          "tableFrom": "richiesta",
          "tableTo": "progetto",
          "columnsFrom": [
            "progetto_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "richiesta_contatto_id_contatto_id_fk": {
          "name": "richiesta_contatto_id_contatto_id_fk",
          "tableFrom": "richiesta",
          "tableTo": "contatto",
          "columnsFrom": [
            "contatto_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "riga": {
      "name": "riga",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": false
        },
        "fattura_id": {
          "name": "fattura_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "ordine": {
          "name": "ordine",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "descrizione": {
          "name": "descrizione",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "quantita_cent": {
          "name": "quantita_cent",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": 100
        },
        "prezzo_unitario_cent": {
          "name": "prezzo_unitario_cent",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        }
      },
      "indexes": {
        "riga_fattura_idx": {
          "name": "riga_fattura_idx",
          "columns": [
            "fattura_id"
          ],
          "isUnique": false
        }
      },
      "foreignKeys": {
        "riga_fattura_id_fattura_id_fk": {
          "name": "riga_fattura_id_fattura_id_fk",
          "tableFrom": "riga",
          "tableTo": "fattura",
          "columnsFrom": [
            "fattura_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "servizio": {
      "name": "servizio",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": false
        },
        "profilo_id": {
          "name": "profilo_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "cliente_id": {
          "name": "cliente_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "progetto_id": {
          "name": "progetto_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "tipo": {
          "name": "tipo",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "nome": {
          "name": "nome",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "fornitore": {
          "name": "fornitore",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "intestatario": {
          "name": "intestatario",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "accessi": {
          "name": "accessi",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "dove_credenziale": {
          "name": "dove_credenziale",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "pagamento": {
          "name": "pagamento",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "costo_cent": {
          "name": "costo_cent",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "valuta": {
          "name": "valuta",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "'EUR'"
        },
        "periodicita": {
          "name": "periodicita",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "'annuale'"
        },
        "prezzo_rivenduto_cent": {
          "name": "prezzo_rivenduto_cent",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "rinnovo_il": {
          "name": "rinnovo_il",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "rinnovo_automatico": {
          "name": "rinnovo_automatico",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "decisione": {
          "name": "decisione",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "'da_decidere'"
        },
        "da_passare_al_cliente": {
          "name": "da_passare_al_cliente",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": false
        },
        "note": {
          "name": "note",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "origine": {
          "name": "origine",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "'web'"
        },
        "chiave": {
          "name": "chiave",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "archiviato": {
          "name": "archiviato",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": false
        },
        "created_at": {
          "name": "created_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(unixepoch() * 1000)"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(unixepoch() * 1000)"
        }
      },
      "indexes": {
        "servizio_profilo_idx": {
          "name": "servizio_profilo_idx",
          "columns": [
            "profilo_id"
          ],
          "isUnique": false
        },
        "servizio_chiave_uq": {
          "name": "servizio_chiave_uq",
          "columns": [
            "profilo_id",
            "chiave"
          ],
          "isUnique": true
        }
      },
      "foreignKeys": {
        "servizio_profilo_id_profilo_id_fk": {
          "name": "servizio_profilo_id_profilo_id_fk",
          "tableFrom": "servizio",
          "tableTo": "profilo",
          "columnsFrom": [
            "profilo_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "servizio_cliente_id_cliente_id_fk": {
          "name": "servizio_cliente_id_cliente_id_fk",
          "tableFrom": "servizio",
          "tableTo": "cliente",
          "columnsFrom": [
            "cliente_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        },
        "servizio_progetto_id_progetto_id_fk": {
          "name": "servizio_progetto_id_progetto_id_fk",
          "tableFrom": "servizio",
          "tableTo": "progetto",
          "columnsFrom": [
            "progetto_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "session": {
      "name": "session",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": false
        },
        "expires_at": {
          "name": "expires_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "token": {
          "name": "token",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "created_at": {
          "name": "created_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(unixepoch() * 1000)"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(unixepoch() * 1000)"
        },
        "ip_address": {
          "name": "ip_address",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "user_agent": {
          "name": "user_agent",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        }
      },
      "indexes": {
        "session_token_unique": {
          "name": "session_token_unique",
          "columns": [
            "token"
          ],
          "isUnique": true
        }
      },
      "foreignKeys": {
        "session_user_id_user_id_fk": {
          "name": "session_user_id_user_id_fk",
          "tableFrom": "session",
          "tableTo": "user",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "token_api": {
      "name": "token_api",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": false
        },
        "profilo_id": {
          "name": "profilo_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "nome": {
          "name": "nome",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "hash": {
          "name": "hash",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "prefisso": {
          "name": "prefisso",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "permessi": {
          "name": "permessi",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "'scrittura'"
        },
        "ultimo_uso": {
          "name": "ultimo_uso",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "revocato_il": {
          "name": "revocato_il",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "created_at": {
          "name": "created_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(unixepoch() * 1000)"
        }
      },
      "indexes": {
        "token_api_hash_unique": {
          "name": "token_api_hash_unique",
          "columns": [
            "hash"
          ],
          "isUnique": true
        },
        "token_profilo_idx": {
          "name": "token_profilo_idx",
          "columns": [
            "profilo_id"
          ],
          "isUnique": false
        }
      },
      "foreignKeys": {
        "token_api_profilo_id_profilo_id_fk": {
          "name": "token_api_profilo_id_profilo_id_fk",
          "tableFrom": "token_api",
          "tableTo": "profilo",
          "columnsFrom": [
            "profilo_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "user": {
      "name": "user",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": false
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "email": {
          "name": "email",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "email_verified": {
          "name": "email_verified",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": false
        },
        "image": {
          "name": "image",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "created_at": {
          "name": "created_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(unixepoch() * 1000)"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(unixepoch() * 1000)"
        }
      },
      "indexes": {
        "user_email_unique": {
          "name": "user_email_unique",
          "columns": [
            "email"
          ],
          "isUnique": true
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "verification": {
      "name": "verification",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": false
        },
        "identifier": {
          "name": "identifier",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "value": {
          "name": "value",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "expires_at": {
          "name": "expires_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "created_at": {
          "name": "created_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(unixepoch() * 1000)"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(unixepoch() * 1000)"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {}
    }
  },
  "views": {},
  "enums": {},
  "_meta": {
    "schemas": {},
    "tables": {},
    "columns": {}
  },
  "internal": {
    "indexes": {}
  }
}