Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Finished creation of methods for working with CQL
- Loading branch information
1 parent
015c0a1
commit 108849f
Showing
3 changed files
with
198 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
CREATE KEYSPACE IF NOT EXISTS YouTubeMDApp WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 3}; | ||
USE YouTubeMDApp; | ||
CREATE TABLE IF NOT EXISTS history (user_id int NOT NULL, file_id varchar NOT NULL); | ||
CREATE TABLE IF NOT EXISTS metadata (title varchar, artist varchar, cover text, duration varchar, music_file_id varchar NOT NULL, PRIMARY KEY (music_file_id)); | ||
CREATE TABLE IF NOT EXISTS metadata (title varchar, artist varchar, cover text, song_duration duration, music_file_id varchar NOT NULL, PRIMARY KEY (music_file_id)); | ||
CREATE TABLE IF NOT EXISTS music (file_id varchar NOT NULL,video_id varchar, audio_quality int, audio_format int, times_requested counter, is_metadata_by_user boolean, PRIMARY KEY (file_id)); | ||
CREATE TABLE IF NOT EXISTS playlist (playlist_id varchar NOT NULL, number_elements int, times_requested counter, PRIMARY KEY (playlist_id)); | ||
CREATE TABLE IF NOT EXISTS playlist_has_music (playlist_playlist_id varchar NOT NULL, music_file_id varchar NOT NULL, playlist_quality int, playlist_format int); | ||
CREATE TABLE IF NOT EXISTS playlist (playlist_unique_id UUID NOT NULL, playlist_id varchar NOT NULL, playlist_quality int, playlist_format int, number_elements int, times_requested counter, PRIMARY KEY (playlist_unique_id)); | ||
CREATE TABLE IF NOT EXISTS playlist_has_music (playlist_unique_id UUID NOT NULL, music_file_id varchar NOT NULL); | ||
CREATE TABLE IF NOT EXISTS preferences (audio_quality varchar, audio_format varchar, os varchar, should_ask_metadata boolean, user_id int NOT NULL, PRIMARY KEY (user_id)); | ||
CREATE TABLE IF NOT EXISTS "User" (user_id int NOT NULL, username varchar, name text, PRIMARY KEY (user_id)); | ||
CREATE TABLE IF NOT EXISTS "User" (user_id int NOT NULL, username varchar, name text, first_use datetime, PRIMARY KEY (user_id)); | ||
CREATE TABLE IF NOT EXISTS Statistics (lang varchar, downloads counter, last_time_active datetime, user_id int NOT NULL, PRIMARY KEY(user_id)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
CREATE KEYSPACE IF NOT EXISTS YouTubeMDApp WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 3}; | ||
USE YouTubeMDApp; | ||
CREATE TABLE IF NOT EXISTS history (user_id int NOT NULL, file_id varchar NOT NULL); | ||
CREATE TABLE IF NOT EXISTS metadata (title varchar, artist varchar, cover text, duration varchar, music_file_id varchar NOT NULL, PRIMARY KEY (music_file_id)); | ||
CREATE TABLE IF NOT EXISTS music (file_id varchar NOT NULL,video_id varchar, audio_quality int, audio_format int, times_requested int, is_metadata_by_user boolean, PRIMARY KEY (file_id)); | ||
CREATE TABLE IF NOT EXISTS playlist (playlist_id varchar NOT NULL, number_elements int, times_requested int, PRIMARY KEY (playlist_id)); | ||
CREATE TABLE IF NOT EXISTS playlist_has_music (playlist_playlist_id varchar NOT NULL, music_file_id varchar NOT NULL, playlist_quality int, playlist_format int); | ||
CREATE TABLE IF NOT EXISTS metadata (title varchar, artist varchar, cover text, song_duration duration, music_file_id varchar NOT NULL, PRIMARY KEY (music_file_id)); | ||
CREATE TABLE IF NOT EXISTS music (file_id varchar NOT NULL,video_id varchar, audio_quality int, audio_format int, times_requested counter, is_metadata_by_user boolean, PRIMARY KEY (file_id)); | ||
CREATE TABLE IF NOT EXISTS playlist (playlist_unique_id UUID NOT NULL, playlist_id varchar NOT NULL, playlist_quality int, playlist_format int, number_elements int, times_requested counter, PRIMARY KEY (playlist_unique_id)); | ||
CREATE TABLE IF NOT EXISTS playlist_has_music (playlist_unique_id UUID NOT NULL, music_file_id varchar NOT NULL); | ||
CREATE TABLE IF NOT EXISTS preferences (audio_quality varchar, audio_format varchar, os varchar, should_ask_metadata boolean, user_id int NOT NULL, PRIMARY KEY (user_id)); | ||
CREATE TABLE IF NOT EXISTS "User" (user_id int NOT NULL, username varchar, name text, PRIMARY KEY (user_id)); | ||
CREATE TABLE IF NOT EXISTS Statistics (lang varchar, downloads int, last_time_active datetime, user_id int NOT NULL, PRIMARY KEY(user_id)); | ||
CREATE TABLE IF NOT EXISTS "User" (user_id int NOT NULL, username varchar, name text, first_use datetime, PRIMARY KEY (user_id)); | ||
CREATE TABLE IF NOT EXISTS Statistics (lang varchar, downloads counter, last_time_active datetime, user_id int NOT NULL, PRIMARY KEY(user_id)); |