• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1UP_SQL = """
2ALTER TABLE afe_shards ADD COLUMN hostname VARCHAR(255) NOT NULL;
3ALTER TABLE afe_hosts ADD COLUMN shard_id INT NULL;
4ALTER TABLE afe_hosts ADD CONSTRAINT hosts_to_shard_ibfk
5    FOREIGN KEY (shard_id) REFERENCES afe_shards(id);
6"""
7
8DOWN_SQL = """
9ALTER TABLE afe_hosts DROP FOREIGN KEY hosts_to_shard_ibfk;
10ALTER TABLE afe_hosts DROP COLUMN shard_id;
11
12ALTER TABLE afe_shards DROP COLUMN hostname;
13"""
14