15 lines
598 B
SQL
15 lines
598 B
SQL
CREATE TABLE IF NOT EXISTS `users` (
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
`username` varchar(255) NOT NULL,
|
|
`password` varchar(255) NOT NULL,
|
|
`role` varchar(50) NOT NULL,
|
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
PRIMARY KEY (`id`),
|
|
UNIQUE KEY `username` (`username`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
|
|
|
-- Insert a default admin user with a hashed password
|
|
-- The password is '''password'''
|
|
INSERT INTO `users` (`username`, `password`, `role`) VALUES
|
|
('''secretariat''', '''$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi''', '''secretariat''');
|