Database Schema: scholarship
Query:
ALTER TABLE scholarship DROP COLUMN reported;
Database Schema: scholarship_reported
Query:
CREATE TABLE scholarship_reported (
id INT NOT NULL AUTO_INCREMENT ,
user_id INT NOT NULL,
scholarship_id INT NOT NULL,
created_at TIMESTAMP NULL,
updated_at TIMESTAMP NULL,
PRIMARY KEY (id),
UNIQUE unique_index(user_id, scholarship_id)
);
Update report scholarship API for store reported entry user wise.
Request URL: /scholarship-reported Request Method: POST Parameter : userId : hash-encoded-userId scholarshipId : hash-encoded-scholarshipId
Database Schema: scholarship Query: ALTER TABLE scholarship DROP COLUMN reported;
Database Schema: scholarship_reported Query: CREATE TABLE
scholarship_reported
(id
INT NOT NULL AUTO_INCREMENT ,user_id
INT NOT NULL,scholarship_id
INT NOT NULL,created_at
TIMESTAMP NULL,updated_at
TIMESTAMP NULL, PRIMARY KEY (id
), UNIQUEunique_index
(user_id
,scholarship_id
) );