-- phpMyAdmin SQL Dump
-- version 4.9.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Nov 25, 2022 at 11:05 AM
-- Server version: 10.6.11-MariaDB
-- PHP Version: 7.4.30

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `aercon0_aerweb`
--

-- --------------------------------------------------------

--
-- Table structure for table `webaxess`
--

CREATE TABLE `webaxess` (
  `id` int(11) NOT NULL,
  `farm_id` int(11) NOT NULL,
  `location_id` int(11) DEFAULT NULL,
  `webfolder` varchar(64) DEFAULT NULL,
  `webusername` varchar(64) DEFAULT NULL,
  `webpassword` varchar(255) DEFAULT NULL,
  `last_comms` int(11) NOT NULL DEFAULT 0,
  `aerware` varchar(32) NOT NULL DEFAULT '?'
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `webaxess`
--
ALTER TABLE `webaxess`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `farm_id` (`farm_id`,`location_id`) USING BTREE,
  ADD UNIQUE KEY `webusername` (`webusername`),
  ADD UNIQUE KEY `webfolder` (`webfolder`),
  ADD KEY `location_idx` (`location_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `webaxess`
--
ALTER TABLE `webaxess`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `webaxess`
--
ALTER TABLE `webaxess`
  ADD CONSTRAINT `webaxess_ibfk_1` FOREIGN KEY (`farm_id`) REFERENCES `aercon0_accounts`.`farms` (`id`),
  ADD CONSTRAINT `webaxess_ibfk_2` FOREIGN KEY (`location_id`) REFERENCES `aercon0_accounts`.`locations` (`id`);
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
