Add new spaces columns to the migrations
This commit is contained in:
parent
7f9cc62667
commit
1570075443
@ -26,7 +26,7 @@ echo "Package: offline-twitter-engine
|
|||||||
Version: $1
|
Version: $1
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Maintainer: me@playfulpachyderm.com
|
Maintainer: me@playfulpachyderm.com
|
||||||
Installed-Size: 7700
|
Installed-Size: 7998
|
||||||
Depends:
|
Depends:
|
||||||
Section: web
|
Section: web
|
||||||
Priority: optional
|
Priority: optional
|
||||||
|
@ -8,7 +8,7 @@ import (
|
|||||||
"offline_twitter/terminal_utils"
|
"offline_twitter/terminal_utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
const ENGINE_DATABASE_VERSION = 14
|
const ENGINE_DATABASE_VERSION = 15
|
||||||
|
|
||||||
type VersionMismatchError struct {
|
type VersionMismatchError struct {
|
||||||
EngineVersion int
|
EngineVersion int
|
||||||
@ -80,6 +80,22 @@ var MIGRATIONS = []string{
|
|||||||
create index if not exists index_polls_tweet_id on polls (tweet_id);
|
create index if not exists index_polls_tweet_id on polls (tweet_id);
|
||||||
create index if not exists index_images_tweet_id on images (tweet_id);
|
create index if not exists index_images_tweet_id on images (tweet_id);
|
||||||
create index if not exists index_videos_tweet_id on videos (tweet_id);`,
|
create index if not exists index_videos_tweet_id on videos (tweet_id);`,
|
||||||
|
`alter table spaces add column created_by_id integer references users(id);
|
||||||
|
alter table spaces add column state text not null;
|
||||||
|
alter table spaces add column title text not null;
|
||||||
|
alter table spaces add column created_at integer not null;
|
||||||
|
alter table spaces add column started_at integer not null;
|
||||||
|
alter table spaces add column ended_at integer not null;
|
||||||
|
alter table spaces add column updated_at integer not null;
|
||||||
|
alter table spaces add column is_available_for_replay boolean not null;
|
||||||
|
alter table spaces add column replay_watch_count integer;
|
||||||
|
alter table spaces add column live_listeners_count integer;
|
||||||
|
alter table spaces add column is_details_fetched boolean not null default 0;
|
||||||
|
create table space_participants(rowid integer primary key,
|
||||||
|
user_id integer not null,
|
||||||
|
space_id not null,
|
||||||
|
foreign key(space_id) references spaces(id)
|
||||||
|
);`,
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user