Add new tables and modify the application code to allow users to log in and create
music playlists that contain different music tracks.
You will not modify Playlist to allow user logins and custom playlists.
Procedure
-
In a terminal, go to the playlist workspace.
-
Check out the
step4
branch using git.
-
Run the cqlsh command.
-
In the playlist keyspace create the
users
and
playlist_tracks
tables.
use playlist;
create table users (username text primary key, password text, playlist_names set<text>);
create table playlist_tracks (username text, playlist_name text, sequence_no timestamp, artist text, track_name text, genre text, track_length_in_seconds int, track_id UUID, primary key ((username, playlist_name), sequence_no ));
-
Quit cqlsh.
-
Build and run Playlist using mvn.
-
In a web browser, navigate to or refresh:
http://localhost:8080/playlist
Now you can create new users and playlists.