Files
hr_soul23/src/db/seeds/02_socias.js
google-labs-jules[bot] 7db61d9af9 feat: Set up database and data models
This commit establishes the database foundation for the HR Platform.

Key changes include:
- Defined the complete data schema in `docs/API_CONTRACTS.md` to serve as a single source of truth.
- Integrated `knex.js` with `sqlite3` to manage the database connection and schema.
- Implemented a version-controlled migration system and created initial migrations for all required tables.
- Created seed files to populate the database with sample data for development.
- Addressed security feedback by using `bcrypt` to hash user passwords in the seed data and adding the SQLite database file to `.gitignore`.
2025-12-13 22:08:28 +00:00

13 lines
527 B
JavaScript

exports.seed = function(knex) {
// Deletes ALL existing entries
return knex('socias').del()
.then(function () {
// Inserts seed entries
return knex('socias').insert([
{nombre: 'Ana', apellido: 'García', fecha_ingreso: '2022-01-15', id_sucursal: 1, activo: true},
{nombre: 'Carla', apellido: 'Lopez', fecha_ingreso: '2021-06-20', id_sucursal: 1, activo: true},
{nombre: 'Maria', apellido: 'Hernandez', fecha_ingreso: '2023-03-10', id_sucursal: 2, activo: false}
]);
});
};