| 
									
										
										
										
											2024-01-26 19:27:58 +00:00
										 |  |  | begin;
 | 
					
						
							|  |  |  | create table if not exists appearancespost (
 | 
					
						
							|  |  |  | 	"yearID"	numeric,
 | 
					
						
							|  |  |  | 	"playerID"	text,
 | 
					
						
							|  |  |  | 	"teamID"	text,
 | 
					
						
							|  |  |  | 	primary key("yearID","playerID")
 | 
					
						
							|  |  |  | );
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | insert into appearancespost
 | 
					
						
							|  |  |  | select distinct yearID, playerID, teamID
 | 
					
						
							|  |  |  | from battingpost
 | 
					
						
							|  |  |  | union
 | 
					
						
							|  |  |  | select distinct yearID, playerID, teamID
 | 
					
						
							| 
									
										
										
										
											2024-01-27 18:39:41 +00:00
										 |  |  | from pitchingpost
 | 
					
						
							|  |  |  | union
 | 
					
						
							|  |  |  | select distinct yearID, playerID, teamID
 | 
					
						
							|  |  |  | from fieldingpost;
 | 
					
						
							| 
									
										
										
										
											2024-01-26 19:27:58 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | alter table "battingpost" drop column "teamID";
 | 
					
						
							|  |  |  | alter table "battingpost" drop column "lgID";
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | alter table "pitchingpost" drop column "teamID";
 | 
					
						
							|  |  |  | alter table "pitchingpost" drop column "lgID";
 | 
					
						
							| 
									
										
										
										
											2024-01-27 18:39:41 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | alter table fieldingpost drop column "teamID";
 | 
					
						
							|  |  |  | alter table fieldingpost drop column "lgID";
 | 
					
						
							| 
									
										
										
										
											2024-01-26 19:27:58 +00:00
										 |  |  | commit;
 |