mirror of
https://github.com/marcogll/hr_soul23.git
synced 2026-01-13 13:25:16 +00:00
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`.
This commit is contained in:
16
knexfile.js
Normal file
16
knexfile.js
Normal file
@@ -0,0 +1,16 @@
|
||||
// knexfile.js
|
||||
module.exports = {
|
||||
development: {
|
||||
client: 'sqlite3',
|
||||
connection: {
|
||||
filename: './dev.sqlite3'
|
||||
},
|
||||
useNullAsDefault: true,
|
||||
migrations: {
|
||||
directory: './src/db/migrations'
|
||||
},
|
||||
seeds: {
|
||||
directory: './src/db/seeds'
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user