Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
Maunium
synapse
Commits
3dfa84be
Commit
3dfa84be
authored
10 years ago
by
Erik Johnston
Browse files
Options
Downloads
Patches
Plain Diff
Convert im schema to a 'one' table structure
parent
08ed4ccf
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/storage/schema/im.sql
+31
-26
31 additions, 26 deletions
synapse/storage/schema/im.sql
with
31 additions
and
26 deletions
synapse/storage/schema/im.sql
+
31
−
26
View file @
3dfa84be
...
@@ -12,43 +12,48 @@
...
@@ -12,43 +12,48 @@
* See the License for the specific language governing permissions and
* See the License for the specific language governing permissions and
* limitations under the License.
* limitations under the License.
*/
*/
CREATE
TABLE
IF
NOT
EXISTS
rooms
(
room_id
TEXT
PRIMARY
KEY
NOT
NULL
,
CREATE
TABLE
IF
NOT
EXISTS
events
(
is_public
INTEGER
,
ordering
INTEGER
PRIMARY
KEY
AUTOINCREMENT
,
creator
TEXT
event_id
TEXT
NOT
NULL
,
event_type
TEXT
NOT
NULL
,
sender
TEXT
,
room_id
TEXT
,
content
TEXT
,
unrecognized_keys
TEXT
);
);
CREATE
TABLE
IF
NOT
EXISTS
room_memberships
(
CREATE
TABLE
IF
NOT
EXISTS
state_events
(
id
INTEGER
PRIMARY
KEY
AUTOINCREMENT
,
event_id
TEXT
NOT
NULL
,
user_id
TEXT
NOT
NULL
,
-- no foreign key to users table, it could be an id belonging to another home server
sender
TEXT
NOT
NULL
,
room_id
TEXT
NOT
NULL
,
room_id
TEXT
NOT
NULL
,
membership
TEXT
NOT
NULL
,
event_type
TEXT
NOT
NULL
,
content
TEXT
NOT
NULL
state_key
TEXT
NOT
NULL
,
prev_state
TEXT
);
);
CREATE
TABLE
IF
NOT
EXISTS
messages
(
CREATE
TABLE
IF
NOT
EXISTS
current_state
(
id
INTEGER
PRIMARY
KEY
AUTOINCREMENT
,
event_id
TEXT
NOT
NULL
,
user_id
TEXT
,
room_id
TEXT
NOT
NULL
,
room_id
TEXT
,
);
msg_id
TEXT
,
content
TEXT
CREATE
TABLE
IF
NOT
EXISTS
room_memberships
(
event_id
TEXT
NOT
NULL
,
user_id
TEXT
NOT
NULL
,
sender
TEXT
NOT
NULL
,
room_id
TEXT
NOT
NULL
,
membership
TEXT
NOT
NULL
);
);
CREATE
TABLE
IF
NOT
EXISTS
feedback
(
CREATE
TABLE
IF
NOT
EXISTS
feedback
(
id
INTEGER
PRIMARY
KEY
AUTOINCREMENT
,
event_id
TEXT
NOT
NULL
,
content
TEXT
,
feedback_type
TEXT
,
feedback_type
TEXT
,
fb_sender_id
TEXT
,
fb_sender_id
TEXT
,
msg_id
TEXT
,
room_id
TEXT
,
room_id
TEXT
,
msg_sender_id
TEXT
content
TEXT
);
);
CREATE
TABLE
IF
NOT
EXISTS
room_data
(
CREATE
TABLE
IF
NOT
EXISTS
rooms
(
id
INTEGER
PRIMARY
KEY
AUTOINCREMENT
,
room_id
TEXT
PRIMARY
KEY
NOT
NULL
,
room_id
TEXT
NOT
NULL
,
is_public
INTEGER
,
type
TEXT
NOT
NULL
,
creator
TEXT
state_key
TEXT
NOT
NULL
,
content
TEXT
);
);
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