changes to media sql