Explorar el Código

add link uuid to model

Pouria Ezzati hace 1 año
padre
commit
7a7b022d29
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      server/models/link.model.js

+ 4 - 0
server/models/link.model.js

@@ -30,6 +30,10 @@ async function createLinkTable(knex) {
         .integer("visit_count")
         .notNullable()
         .defaultTo(0);
+      table
+        .uuid("uuid")
+        .notNullable()
+        .defaultTo(knex.fn.uuid());
       table.timestamps(false, true);
     });
   }