how to add data compression to a primary key of a table?
Is there a way to apply a data compression to this table without dropping the primary key?


Yes you just need to run below command to rebuild the clustered index (in your case it is also PK):

ALTER INDEX [PK__t1__3BD0198E286DEFE4] on TABLE [t1] 
REBUILD with (ONLINE = ON, DATA_COMPRESSION = PAGE)


"ONLINE = ON" clause can help greatly reduce locking of table that is being rebuilt