mirror of
				https://github.com/johrpan/musicus_mobile.git
				synced 2025-10-26 18:57:25 +01:00 
			
		
		
		
	Remove seperate role repesentation
The role and instrument tables have been merged into one (the instrument table). There are not that many roles that aren't instruments and it is much simpler to mange this way. The role editor and role selector have been removed and the instrument related UI parts have been modified accordingly.
This commit is contained in:
		
							parent
							
								
									24f2022930
								
							
						
					
					
						commit
						99e4711cfc
					
				
					 8 changed files with 57 additions and 172 deletions
				
			
		|  | @ -4,6 +4,8 @@ CREATE TABLE persons ( | |||
|     last_name TEXT NOT NULL | ||||
| ); | ||||
| 
 | ||||
| -- This represents real instruments as well as other roles that can be played | ||||
| -- in a recording. | ||||
| CREATE TABLE instruments ( | ||||
|     id INTEGER NOT NULL PRIMARY KEY, | ||||
|     name TEXT NOT NULL | ||||
|  | @ -28,11 +30,6 @@ CREATE TABLE ensembles ( | |||
|     name TEXT NOT NULL | ||||
| ); | ||||
| 
 | ||||
| CREATE TABLE roles ( | ||||
|     id INTEGER NOT NULL PRIMARY KEY, | ||||
|     name TEXT NOT NULL | ||||
| ); | ||||
| 
 | ||||
| CREATE TABLE recordings ( | ||||
|     id INTEGER NOT NULL PRIMARY KEY, | ||||
|     work INTEGER REFERENCES works(id) | ||||
|  | @ -42,7 +39,7 @@ CREATE TABLE performances ( | |||
|     recording INTEGER NOT NULL REFERENCES recordings(id) ON DELETE CASCADE, | ||||
|     person INTEGER REFERENCES persons(id) ON DELETE CASCADE, | ||||
|     ensemble INTEGER REFERENCES ensembles(id) ON DELETE CASCADE, | ||||
|     role INTEGER REFERENCES roles(id) | ||||
|     role INTEGER REFERENCES instruments(id) | ||||
| ); | ||||
| 
 | ||||
| allPersons: | ||||
|  | @ -84,12 +81,6 @@ SELECT * FROM ensembles ORDER BY name; | |||
| ensembleById: | ||||
| SELECT * FROM ensembles WHERE id = :id LIMIT 1; | ||||
| 
 | ||||
| allRoles: | ||||
| SELECT * FROM roles ORDER BY name; | ||||
| 
 | ||||
| roleById: | ||||
| SELECT * FROM roles WHERE id = :id LIMIT 1; | ||||
| 
 | ||||
| recordingById: | ||||
| SELECT * FROM recordings WHERE id = :id; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Elias Projahn
						Elias Projahn