Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
Photogram Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sanjay 001
Photogram Project
Commits
996b699f
Commit
996b699f
authored
1 year ago
by
Sibidharan
Browse files
Options
Downloads
Patches
Plain Diff
photogram db
parent
70cf4e27
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
db.sql
+95
-0
95 additions, 0 deletions
db.sql
with
95 additions
and
0 deletions
db.sql
0 → 100644
+
95
−
0
View file @
996b699f
-- Adminer 4.8.1 MySQL 8.0.33 dump
SET
NAMES
utf8
;
SET
time_zone
=
'+00:00'
;
SET
foreign_key_checks
=
0
;
SET
NAMES
utf8mb4
;
DROP
TABLE
IF
EXISTS
`auth`
;
CREATE
TABLE
`auth`
(
`id`
int
NOT
NULL
AUTO_INCREMENT
,
`username`
tinytext
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_0900_ai_ci
NOT
NULL
,
`password`
tinytext
NOT
NULL
,
`phone`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_0900_ai_ci
NOT
NULL
,
`email`
tinytext
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_0900_ai_ci
NOT
NULL
,
`blocked`
int
NOT
NULL
DEFAULT
'0'
,
`active`
tinyint
NOT
NULL
DEFAULT
'0'
,
`sec_email`
varchar
(
255
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
),
UNIQUE
KEY
`phone`
(
`phone`
),
UNIQUE
KEY
`name`
(
`username`
(
20
)),
UNIQUE
KEY
`email`
(
`email`
(
32
))
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_0900_ai_ci
;
DROP
TABLE
IF
EXISTS
`likes`
;
CREATE
TABLE
`likes`
(
`id`
varchar
(
32
)
NOT
NULL
,
`user_id`
int
NOT
NULL
,
`post_id`
int
NOT
NULL
,
`like`
int
NOT
NULL
,
`timestamp`
timestamp
NOT
NULL
,
PRIMARY
KEY
(
`id`
),
KEY
`user_id`
(
`user_id`
),
KEY
`post_id`
(
`post_id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_0900_ai_ci
;
DROP
TABLE
IF
EXISTS
`post_images`
;
CREATE
TABLE
`post_images`
(
`id`
int
NOT
NULL
AUTO_INCREMENT
,
`post_id`
int
NOT
NULL
,
`image_uri`
varchar
(
2048
)
NOT
NULL
,
PRIMARY
KEY
(
`id`
),
KEY
`post_id`
(
`post_id`
),
CONSTRAINT
`post_images_ibfk_1`
FOREIGN
KEY
(
`post_id`
)
REFERENCES
`posts`
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_0900_ai_ci
;
DROP
TABLE
IF
EXISTS
`posts`
;
CREATE
TABLE
`posts`
(
`id`
int
NOT
NULL
AUTO_INCREMENT
,
`post_text`
varchar
(
160
)
COLLATE
utf32_bin
NOT
NULL
,
`multiple_images`
int
NOT
NULL
DEFAULT
'0'
,
`image_uri`
varchar
(
1024
)
COLLATE
utf32_bin
NOT
NULL
,
`like_count`
int
NOT
NULL
,
`uploaded_time`
timestamp
NOT
NULL
ON
UPDATE
CURRENT_TIMESTAMP
,
`owner`
varchar
(
128
)
COLLATE
utf32_bin
NOT
NULL
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf32
COLLATE
=
utf32_bin
;
DROP
TABLE
IF
EXISTS
`session`
;
CREATE
TABLE
`session`
(
`id`
int
NOT
NULL
AUTO_INCREMENT
,
`uid`
int
NOT
NULL
,
`token`
varchar
(
32
)
NOT
NULL
,
`login_time`
datetime
NOT
NULL
ON
UPDATE
CURRENT_TIMESTAMP
,
`ip`
varchar
(
20
)
NOT
NULL
,
`user_agent`
varchar
(
256
)
NOT
NULL
,
`active`
int
NOT
NULL
DEFAULT
'1'
,
`fingerprint`
varchar
(
255
)
NOT
NULL
,
PRIMARY
KEY
(
`id`
),
KEY
`uid`
(
`uid`
),
CONSTRAINT
`session_ibfk_1`
FOREIGN
KEY
(
`uid`
)
REFERENCES
`auth`
(
`id`
)
ON
DELETE
RESTRICT
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_0900_ai_ci
;
DROP
TABLE
IF
EXISTS
`users`
;
CREATE
TABLE
`users`
(
`id`
int
NOT
NULL
,
`bio`
longtext
NOT
NULL
,
`avatar`
varchar
(
1024
)
NOT
NULL
,
`firstname`
tinytext
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_0900_ai_ci
NOT
NULL
,
`lastname`
tinytext
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_0900_ai_ci
NOT
NULL
,
`dob`
date
NOT
NULL
,
`instagram`
varchar
(
1024
)
NOT
NULL
,
`twitter`
varchar
(
1024
)
NOT
NULL
,
`facebook`
varchar
(
1024
)
NOT
NULL
,
PRIMARY
KEY
(
`id`
),
CONSTRAINT
`users_ibfk_1`
FOREIGN
KEY
(
`id`
)
REFERENCES
`auth`
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_0900_ai_ci
;
-- 2023-07-11 13:20:19
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment