public function index($offset, $offsettennis, $showtype)
 {
     // 羽毛球的数据处理
     $d = date('Y-m-d', strtotime('+' . $offset . ' day'));
     $today = date('Y-m-d');
     $totalday = BadmintonState::where('date', '>=', $today)->distinct()->count('date');
     for ($i = 0; $i < $totalday; $i++) {
         $days[$i] = date('Y-m-d', strtotime('+' . $i . ' day'));
     }
     // 羽毛球的数据处理结束
     // 乒乓球的数据处理
     $pingpangs = Pingpang::where('date', '=', $today)->get();
     // 乒乓球的数据处理结束
     // 网球的数据处理
     $dtennis = date('Y-m-d', strtotime('+' . $offsettennis . ' day'));
     $totaldaytennis = Tennis::where('date', '>=', $today)->distinct()->count('date');
     for ($i = 0; $i < $totaldaytennis; $i++) {
         $daystennis[$i] = date('Y-m-d', strtotime('+' . $i . ' day'));
     }
     $tennises = Tennis::where('date', '=', $dtennis)->get();
     // 网球的数据处理结束
     // 篮球订单的数据处理
     $basketballs = Application::where('type', '=', 'basketball')->get();
     //  篮球订单的数据处理结束
     return view('query.queryhome', ['days' => $days, 'daystennis' => $daystennis, 'offset' => $offset, 'offsettennis' => $offsettennis, 'totalday' => $totalday, 'totaldaytennis' => $totaldaytennis, 'pingpangs' => $pingpangs, 'tennises' => $tennises, 'showtype' => $showtype, 'basketballs' => $basketballs])->withBadmintonstates(BadmintonState::where('date', '=', $d)->get());
 }
 /**
  * Determine if the user is authorized to make this request.
  *
  * @return bool
  */
 public function authorize()
 {
     $course = $this->get('course_id');
     $message = trans('messages.your_application_was_sent_successfully');
     Flash::info($message);
     return !Application::where('course_id', $course)->where('user_id', Auth::id())->exists();
 }
Example #3
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $studentid = Auth::user()->studentid;
     $orders = Order::where('userid', '=', $studentid)->get();
     $applications = Application::where('studentid', '=', $studentid)->get();
     return view('infohome', ['orders' => $orders, 'applications' => $applications]);
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function destroy($id)
 {
     $user = User::findOrFail($id);
     try {
         $user->delete();
         Application::where('user_id', $id)->delete();
         session()->flash('success', 'User is successfully deleted.');
     } catch (\Exception $e) {
         session()->flash('error', 'Error occured to delete the user.');
     }
     return back();
 }
 public function show(User $user)
 {
     $app = Application::where('user_id', $user->id)->paginate(8);
     $checkApp = $app->isEmpty();
     $article = article::with('ArticleCategories')->where('user_id', $user->id)->get();
     $checkArticle = $article->isEmpty();
     //dd($article);
     if (\Auth::check()) {
         $url = str_contains($this->checkloginpage($user->name), \Auth::user()->name);
     } else {
         $url = false;
     }
     return view('profile.showProfile', compact('user', 'app', 'article', 'url', 'checkApp', 'checkArticle'));
 }
Example #6
0
 public function listFund()
 {
     $userId = Auth::user()->id;
     $applications = Application::where('owner', $userId)->get();
     $checkRegistered = [];
     for ($i = 0; $i < count($applications); $i++) {
         array_push($checkRegistered, $applications[$i]->fund);
     }
     $funds = Fund::where('apply_start', '<=', new \DateTime('today'))->where('apply_end', '>=', new \DateTime('today'))->get();
     for ($i = 0; $i < count($funds); $i++) {
         if (in_array($funds[$i]->id, $checkRegistered)) {
             $funds[$i]->registered = true;
         }
     }
     return view('funds.list_fund', ['funds' => $funds]);
 }
Example #7
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     //$partner_id = \App\Partner::where('acronym','=','MBA')->pluck('id');
     //$application_id = \App\Application::where('acronym','=','MBAGrades')->pluck('id');
     $environment_id = \App\Environment::where('name', '=', 'CEE')->pluck('id');
     DB::table('runs')->insert(['created_at' => Carbon\Carbon::now()->toDateTimeString(), 'updated_at' => Carbon\Carbon::now()->toDateTimeString(), 'name' => 'Test Run #1', 'description' => 'MBA Grades Smoke Tests', 'start_date_time' => Carbon\Carbon::now()->toDateTimeString(), 'end_date_time' => Carbon\Carbon::now()->toDateTimeString(), 'environment_id' => $environment_id]);
     $partner_id = \App\Partner::where('acronym', '=', 'MBA')->pluck('id');
     $application_id = \App\Application::where('acronym', '=', 'MBAGrades')->pluck('id');
     $environment_id = \App\Environment::where('name', '=', 'CEE')->pluck('id');
     DB::table('runs')->insert(['created_at' => Carbon\Carbon::now()->toDateTimeString(), 'updated_at' => Carbon\Carbon::now()->toDateTimeString(), 'name' => 'Test Run #2', 'description' => 'MBA Grades Smoke Tests', 'start_date_time' => Carbon\Carbon::now()->toDateTimeString(), 'end_date_time' => Carbon\Carbon::now()->toDateTimeString(), 'environment_id' => $environment_id]);
     $partner_id = \App\Partner::where('acronym', '=', 'MBA')->pluck('id');
     $application_id = \App\Application::where('acronym', '=', 'MBAGrades')->pluck('id');
     $environment_id = \App\Environment::where('name', '=', 'CEE')->pluck('id');
     DB::table('runs')->insert(['created_at' => Carbon\Carbon::now()->toDateTimeString(), 'updated_at' => Carbon\Carbon::now()->toDateTimeString(), 'name' => 'Test Run #3', 'description' => 'MBA Grades Smoke Tests', 'start_date_time' => Carbon\Carbon::now()->toDateTimeString(), 'end_date_time' => Carbon\Carbon::now()->toDateTimeString(), 'environment_id' => $environment_id]);
     $partner_id = \App\Partner::where('acronym', '=', 'DOC')->pluck('id');
     $application_id = \App\Application::where('acronym', '=', 'DOCGrades')->pluck('id');
     $environment_id = \App\Environment::where('name', '=', 'CEE')->pluck('id');
     DB::table('runs')->insert(['created_at' => Carbon\Carbon::now()->toDateTimeString(), 'updated_at' => Carbon\Carbon::now()->toDateTimeString(), 'name' => 'Test Run #4', 'description' => 'Doctoral Grades Smoke Tests', 'start_date_time' => Carbon\Carbon::now()->toDateTimeString(), 'end_date_time' => Carbon\Carbon::now()->toDateTimeString(), 'environment_id' => $environment_id]);
     $partner_id = \App\Partner::where('acronym', '=', 'EE')->pluck('id');
     $application_id = \App\Application::where('acronym', '=', 'Atlas')->pluck('id');
     $environment_id = \App\Environment::where('name', '=', 'CEE')->pluck('id');
     DB::table('runs')->insert(['created_at' => Carbon\Carbon::now()->toDateTimeString(), 'updated_at' => Carbon\Carbon::now()->toDateTimeString(), 'name' => 'Test Run #5', 'description' => 'Atlas Smoke Tests', 'start_date_time' => Carbon\Carbon::now()->toDateTimeString(), 'end_date_time' => Carbon\Carbon::now()->toDateTimeString(), 'environment_id' => $environment_id]);
     $partner_id = \App\Partner::where('acronym', '=', 'EE')->pluck('id');
     $application_id = \App\Application::where('acronym', '=', 'Atlas')->pluck('id');
     $environment_id = \App\Environment::where('name', '=', 'CEE')->pluck('id');
     DB::table('runs')->insert(['created_at' => Carbon\Carbon::now()->toDateTimeString(), 'updated_at' => Carbon\Carbon::now()->toDateTimeString(), 'name' => 'Test Run #6', 'description' => 'Atlas Smoke Tests', 'start_date_time' => Carbon\Carbon::now()->toDateTimeString(), 'end_date_time' => Carbon\Carbon::now()->toDateTimeString(), 'environment_id' => $environment_id]);
     $partner_id = \App\Partner::where('acronym', '=', 'EE')->pluck('id');
     $application_id = \App\Application::where('acronym', '=', 'Atlas')->pluck('id');
     $environment_id = \App\Environment::where('name', '=', 'CEE')->pluck('id');
     DB::table('runs')->insert(['created_at' => Carbon\Carbon::now()->toDateTimeString(), 'updated_at' => Carbon\Carbon::now()->toDateTimeString(), 'name' => 'Test Run #7', 'description' => 'Atlas Smoke Tests', 'start_date_time' => Carbon\Carbon::now()->toDateTimeString(), 'end_date_time' => Carbon\Carbon::now()->toDateTimeString(), 'environment_id' => $environment_id]);
     $partner_id = \App\Partner::where('acronym', '=', 'OPS')->pluck('id');
     $application_id = \App\Application::where('acronym', '=', 'QuickCodes')->pluck('id');
     $environment_id = \App\Environment::where('name', '=', 'CEE')->pluck('id');
     DB::table('runs')->insert(['created_at' => Carbon\Carbon::now()->toDateTimeString(), 'updated_at' => Carbon\Carbon::now()->toDateTimeString(), 'name' => 'Test Run #8', 'description' => 'Quick Codes Smoke Tests', 'start_date_time' => Carbon\Carbon::now()->toDateTimeString(), 'end_date_time' => Carbon\Carbon::now()->toDateTimeString(), 'environment_id' => $environment_id]);
     $partner_id = \App\Partner::where('acronym', '=', 'OPS')->pluck('id');
     $application_id = \App\Application::where('acronym', '=', 'QuickCodes')->pluck('id');
     $environment_id = \App\Environment::where('name', '=', 'CEE')->pluck('id');
     DB::table('runs')->insert(['created_at' => Carbon\Carbon::now()->toDateTimeString(), 'updated_at' => Carbon\Carbon::now()->toDateTimeString(), 'name' => 'Test Run #9', 'description' => 'Quick Codes Smoke Tests', 'start_date_time' => Carbon\Carbon::now()->toDateTimeString(), 'end_date_time' => Carbon\Carbon::now()->toDateTimeString(), 'environment_id' => $environment_id]);
     $partner_id = \App\Partner::where('acronym', '=', 'OPS')->pluck('id');
     $application_id = \App\Application::where('acronym', '=', 'QuickCodes')->pluck('id');
     $environment_id = \App\Environment::where('name', '=', 'CEE')->pluck('id');
     DB::table('runs')->insert(['created_at' => Carbon\Carbon::now()->toDateTimeString(), 'updated_at' => Carbon\Carbon::now()->toDateTimeString(), 'name' => 'Test Run #10', 'description' => 'Quick Codes Smoke Tests', 'start_date_time' => Carbon\Carbon::now()->toDateTimeString(), 'end_date_time' => Carbon\Carbon::now()->toDateTimeString(), 'environment_id' => $environment_id]);
     $partner_id = \App\Partner::where('acronym', '=', 'OPS')->pluck('id');
     $application_id = \App\Application::where('acronym', '=', 'QuickCodes')->pluck('id');
     $environment_id = \App\Environment::where('name', '=', 'CEE')->pluck('id');
     DB::table('runs')->insert(['created_at' => Carbon\Carbon::now()->toDateTimeString(), 'updated_at' => Carbon\Carbon::now()->toDateTimeString(), 'name' => 'Test Run #11', 'description' => 'Quick Codes Smoke Tests', 'start_date_time' => Carbon\Carbon::now()->toDateTimeString(), 'end_date_time' => Carbon\Carbon::now()->toDateTimeString(), 'environment_id' => $environment_id]);
 }
 /**
  * Generate the token for given api key.
  *
  * @param  string $key
  * @return \Symfony\Component\HttpFoundation\JsonResponse
  */
 public function generate($key)
 {
     $app = Application::where('key', '=', $key)->first();
     if (is_null($app) || $app->disable) {
         $msg = is_null($app) ? 'Invalid app key' : 'Application is disable';
         return response_unauthorized($msg);
     }
     $tokenValue = $this->getUUID5Token($app);
     if ($tokenValue) {
         $token = new Token();
         $token->app_id = $app->id;
         // Application ID
         $token->app_key = $app->key;
         // Application Key
         $token->user_id = $app->user_id;
         // Application owner id
         $token->token = $tokenValue;
         // Token for unique user.
         if ($token->save()) {
             return response_ok($token);
         }
     }
     return response_error('Error occured to generate token. Please try again');
 }
Example #9
0
 public function Dealwithapp($id)
 {
     $offset = 0;
     $offsettennis = 0;
     $showtype = 5;
     $d = date('Y-m-d', strtotime('+' . $offset . ' day'));
     $today = date('Y-m-d');
     $totalday = BadmintonState::where('date', '>=', $today)->distinct()->count('date');
     for ($i = 0; $i < $totalday; $i++) {
         $days[$i] = date('Y-m-d', strtotime('+' . $i . ' day'));
     }
     $pingpangs = Pingpang::where('date', '=', $today)->get();
     $dtennis = date('Y-m-d', strtotime('+' . $offsettennis . ' day'));
     $totaldaytennis = Tennis::where('date', '>=', $today)->distinct()->count('date');
     for ($i = 0; $i < $totaldaytennis; $i++) {
         $daystennis[$i] = date('Y-m-d', strtotime('+' . $i . ' day'));
     }
     $tennises = Tennis::where('date', '=', $dtennis)->get();
     $application = Application::find($id);
     if (Input::get('result') == 'yes') {
         $application->enable = 2;
     } else {
         $application->enable = 0;
     }
     if ($application->save()) {
         // 篮球订单的数据处理
         $basketballs = Application::where('type', '=', 'basketball')->get();
         // 篮球订单的数据处理结束
         // 足球订单的数据处理
         $footballs = Application::where('type', '=', 'football')->get();
         // 足球订单的数据处理结束
         return view('query.queryadminhome', ['days' => $days, 'daystennis' => $daystennis, 'offset' => $offset, 'offsettennis' => $offsettennis, 'totalday' => $totalday, 'totaldaytennis' => $totaldaytennis, 'pingpangs' => $pingpangs, 'tennises' => $tennises, 'showtype' => $showtype, 'basketballs' => $basketballs, 'footballs' => $footballs])->withBadmintonstates(BadmintonState::where('date', '=', $d)->get());
     } else {
         return Redirect::back()->withInput()->withErrors('保存失败!');
     }
 }
 /**
  * Search application.
  *
  * @return \Redirect
  */
 public function application(Request $request)
 {
     $query = $request->query('s');
     $applications = Application::where('key', $query)->paginate();
     return view('app.admin-index', compact('applications'));
 }
Example #11
0
 public function countFinish()
 {
     $allApp = Application::where('fund', $this->id)->whereIn('status', array('approved_project_finished'))->get();
     return count($allApp);
 }
Example #12
0
 /**
  * Update the specified resource in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function update($id)
 {
     $tennis = Tennis::find($id);
     if (Input::get('changetype') == 'lock') {
         if (Input::get('time') == 'six2seven') {
             $tennis->six2seven = 1;
         } else {
             if (Input::get('time') == 'seven2eight') {
                 $tennis->seven2eight = 1;
             } else {
                 $tennis->eight2nine = 1;
             }
         }
     } else {
         if (Input::get('changetype') == 'unlock') {
             if (Input::get('time') == 'six2seven') {
                 $tennis->six2seven = 0;
             } else {
                 if (Input::get('time') == 'seven2eight') {
                     $tennis->seven2eight = 0;
                 } else {
                     $tennis->eight2nine = 0;
                 }
             }
         }
     }
     if ($tennis->save()) {
         $offset = 0;
         $startdate = strtotime(date('Y-m-d'));
         $enddate = strtotime($tennis->date);
         $offsettennis = round(($enddate - $startdate) / 86400);
         $showtype = 3;
         $d = date('Y-m-d', strtotime('+' . $offset . ' day'));
         $today = date('Y-m-d');
         $totalday = BadmintonState::where('date', '>=', $today)->distinct()->count('date');
         for ($i = 0; $i < $totalday; $i++) {
             $days[$i] = date('Y-m-d', strtotime('+' . $i . ' day'));
         }
         $pingpangs = Pingpang::where('date', '=', $today)->get();
         $dtennis = date('Y-m-d', strtotime('+' . $offsettennis . ' day'));
         $totaldaytennis = Tennis::where('date', '>=', $today)->distinct()->count('date');
         for ($i = 0; $i < $totaldaytennis; $i++) {
             $daystennis[$i] = date('Y-m-d', strtotime('+' . $i . ' day'));
         }
         $tennises = Tennis::where('date', '=', $dtennis)->get();
         // 篮球订单的数据处理
         $basketballs = Application::where('type', '=', 'basketball')->get();
         $basketballs = $basketballs->sortByDesc('id');
         //  篮球订单的数据处理结束
         // 足球订单的数据处理
         $footballs = Application::where('type', '=', 'football')->get();
         $footballs = $footballs->sortByDesc('id');
         // 足球订单的数据处理结束
         // 游泳订单的数据处理
         $swimmings = Application::where('type', '=', 'swimming')->get();
         $swimmings = $swimmings->sortByDesc('id');
         // 游泳订单的数据处理结束
         return view('query.queryadminhome', ['days' => $days, 'daystennis' => $daystennis, 'offset' => $offset, 'offsettennis' => $offsettennis, 'totalday' => $totalday, 'totaldaytennis' => $totaldaytennis, 'pingpangs' => $pingpangs, 'tennises' => $tennises, 'showtype' => $showtype, 'basketballs' => $basketballs, 'footballs' => $footballs, 'swimmings' => $swimmings])->withBadmintonstates(BadmintonState::where('date', '=', $d)->get());
     } else {
         return Redirect::back()->withInput()->withErrors('保存失败!');
     }
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $applications = Application::where('user_id', Auth::id())->paginate();
     return view('applications.index')->with('applications', $applications)->with('title', trans('titles.my_application'));
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $pid		profile id
  * @param  int  $jid		jobpost id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     $application = Application::where('profile_id', $pid)->where('jobpost_id', $jid)->firstOrFail();
     $application->delete();
     return back();
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($app)
 {
     Application::where('slug', '=', $app->slug)->delete();
     \File::delete($app->photo);
     \File::delete($app->application);
     return redirect('user/' . \Auth::user()->name);
 }
Example #16
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $app = Database::create(["name" => "LogosDB", 'description' => "Logos Production DB", "rpo" => "15 min", "rto" => "15 min", "dr_strategy" => "mirrored. synchronous. drlogos7sql", "ha_strategy" => "n/a", "server_id" => Server::where('name', 'logos7sql')->first()->id, "inactive_flag" => 0, "production_flag" => 1, "ignore_flag" => 0]);
     $app->people()->attach([Person::where('name', 'Jeremy Bloomstrom')->first()->id, Person::where('name', 'Davey Griffith')->first()->id]);
     $app->applications()->attach([Application::where('name', 'Logos')->first()->id]);
     $app->servers()->attach([Server::where('name', 'logos7sql')->first()->id]);
     $app = Database::create(["name" => "govern_prod", 'description' => "Govern production database", "rpo" => "15 min", "rto" => "15 min", "dr_strategy" => "mirrored, synchronous, drgovsql", "ha_strategy" => "n/a", "upgrade_readiness" => "Vendor Approved : Unknown\n      Vendor Assist : Unknown\n      Upgrade Advisor :  Yes\n      Issues :\n       Error : SQL Mail Has Been Discontinued. This affects usp_DiskFreeSpaceAlert.\n       Mitigation : Rewrite the USP to use DB Mail instead\n\n       Warning: Several views contain remote references to smalldatetime columns. Under compatibility level 110, remote smalldatetime columns are now returned to local servers as smalldatetime columns instead of as datetime columns. This may make the view unable to accept updates.\n       Mitigation: Keep DBCL at 100 or change the datatype of the remote columns to datetime.\n\n       Warning : The DB Mirroring feature is deprecated and will be removed in a future release.\n       Mitigation : Implement another DR strategy.", "server_id" => Server::where('name', 'govsql')->first()->id, "inactive_flag" => 0, "production_flag" => 1, "ignore_flag" => 0]);
     $app->people()->attach([Person::where('name', 'Jeremy Bloomstrom')->first()->id, Person::where('name', 'Matt Rykaczewski')->first()->id, Person::where('name', 'Davey Griffith')->first()->id, Person::where('name', 'Ed Bennett')->first()->id]);
     $app->applications()->attach([Application::where('name', 'Govern')->first()->id]);
     $app->servers()->attach([Server::where('name', 'govsql')->first()->id]);
     $app = Database::create(["name" => "TrimProduction", 'description' => "Trim Production database", "rpo" => "15 min", "rto" => "1 hour", "dr_strategy" => "mirrored, synchronous, drmsb01sql", "ha_strategy" => "n/a", "upgrade_readiness" => "Vendor Approved : Yes\n      Vendor Assist : N/A\n      Upgrade Advisor :  Yes\n      Issues :\n       Warning: DB Mirroring will be deprecated in a future version\n       Mitigation: Implement another DR strategy", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 1, "ignore_flag" => 0]);
     $app->people()->attach([Person::where('name', 'Jeremy Bloomstrom')->first()->id, Person::where('name', 'Davey Griffith')->first()->id]);
     $app->applications()->attach([Application::where('name', 'Trim')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "MSBDATA", 'description' => "Govern Reporting Database", "server_id" => Server::where('name', 'msbsqlrpt')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 0]);
     $app->people()->attach([Person::where('name', 'Jeremy Bloomstrom')->first()->id, Person::where('name', 'Matt Rykaczewski')->first()->id, Person::where('name', 'Davey Griffith')->first()->id, Person::where('name', 'Ed Bennett')->first()->id]);
     $app->applications()->attach([Application::where('name', 'Govern')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msbsqlrpt')->first()->id]);
     $app = Database::create(["name" => "eSuiteDB", 'description' => "eSuite Production DB", "rpo" => "15 min", "rto" => "1 hour", "dr_strategy" => "n/a", "ha_strategy" => "n/a", "server_id" => Server::where('name', 'logos7sql')->first()->id, "inactive_flag" => 0, "production_flag" => 1, "ignore_flag" => 0]);
     $app->people()->attach([Person::where('name', 'Jeremy Bloomstrom')->first()->id, Person::where('name', 'Davey Griffith')->first()->id]);
     $app->applications()->attach([Application::where('name', 'eSuite')->first()->id]);
     $app->servers()->attach([Server::where('name', 'logos7sql')->first()->id]);
     $app = Database::create(["name" => "Monitor", 'description' => "Disk space reporting db.", "server_id" => Server::where('name', 'govsql')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 1]);
     $app->servers()->attach([Server::where('name', 'govsql')->first()->id]);
     $app = Database::create(["name" => "LogosMigrate", 'description' => "Logos Upgrade migration db", "server_id" => Server::where('name', 'logos7sql')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 1]);
     $app->servers()->attach([Server::where('name', 'logos7sql')->first()->id]);
     $app = Database::create(["name" => "LogosConfig", 'description' => "Logos Upgrade Config DB", "dr_strategy" => "n/a", "ha_strategy" => "n/a", "server_id" => Server::where('name', 'logos7sql')->first()->id, "inactive_flag" => 1, "production_flag" => 0, "ignore_flag" => 1]);
     $app->applications()->attach([Application::where('name', 'Logos')->first()->id]);
     $app->servers()->attach([Server::where('name', 'logos7sql')->first()->id]);
     $app = Database::create(["name" => "TrimTrain", 'description' => "Trim Training Database", "dr_strategy" => "n/a", "ha_strategy" => "n/a", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 0]);
     $app->applications()->attach([Application::where('name', 'Trim')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "TrimDevelopment", 'description' => "Trim Testing Database", "dr_strategy" => "n/a", "ha_strategy" => "n/a", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 0]);
     $app->applications()->attach([Application::where('name', 'Trim')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "wasteworks", 'description' => "WasteWorks Production DB", "rpo" => "15 min", "rto" => "1 hour", "dr_strategy" => "n/a", "ha_strategy" => "n/a", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 1, "ignore_flag" => 0]);
     $app->people()->attach([Person::where('name', 'Davey Griffith')->first()->id, Person::where('name', 'Elizabeth Grigsby')->first()->id, Person::where('name', 'Jeremy Bloomstrom')->first()->id]);
     $app->applications()->attach([Application::where('name', 'WasteWorks')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "AbraHRMS_Live", 'description' => "Abra Production Database", "rpo" => "15 min", "rto" => "1 hour", "dr_strategy" => "n/a", "ha_strategy" => "n/a", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 1, "ignore_flag" => 0]);
     $app->people()->attach([Person::where('name', 'Davey Griffith')->first()->id, Person::where('name', 'Elizabeth Grigsby')->first()->id, Person::where('name', 'Jeremy Bloomstrom')->first()->id]);
     $app->applications()->attach([Application::where('name', 'Abra')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "AbraEmployeeSelfService", 'description' => "Abra Employee Self Service Database", "rpo" => "15 min", "rto" => "1 hour", "dr_strategy" => "n/a", "ha_strategy" => "n/a", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 1, "ignore_flag" => 0]);
     $app->people()->attach([Person::where('name', 'Elizabeth Grigsby')->first()->id, Person::where('name', 'Jeremy Bloomstrom')->first()->id]);
     $app->applications()->attach([Application::where('name', 'Abra')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "AbraHRMS_Sample", 'description' => "Abra Test Database", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 0]);
     $app->applications()->attach([Application::where('name', 'Abra')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "Actions", 'description' => "Search Actions Database", "rpo" => "1 hour", "rto" => "1 hour", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 1, "ignore_flag" => 0]);
     $app->people()->attach([Person::where('name', 'Davey Griffith')->first()->id, Person::where('name', 'Jack Horner')->first()->id, Person::where('name', 'Jeremy Bloomstrom')->first()->id]);
     $app->applications()->attach([Application::where('name', 'Actions')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "Aimwin", 'description' => "Ambulance Billing Database", "rpo" => "1 hour", "rto" => "1 hour", "upgrade_readiness" => "Vendor Approved : Yes\n      Vendor Assist : N/A\n      Upgrade Advisor : No, incompatible with DBCL 80\n      Issues :\n       Error : The db is at DBCL 80 which is incompatible with SQL Server 2012.\n       Mitigation : The vendor stated that the DBCL can be changed to 100 without a problem.", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 1, "ignore_flag" => 0]);
     $app->people()->attach([Person::where('name', 'Davey Griffith')->first()->id]);
     $app->applications()->attach([Application::where('name', 'AIMS')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "Aimwin_Archive", 'description' => "Ambulance Billing Archive Database", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 0]);
     $app->applications()->attach([Application::where('name', 'AIMS')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "Animal", 'description' => "Chameleon (Animal Care) Database", "upgrade_readiness" => "Vendor Approved : Yes\n      Vendor Assist : Vendor will be providing updated views to make the db compatible with DBCL 90.\n      Upgrade Advisor : No, incompatible with DBCL 80\n      Issues :\n       Error : The db is at DBCL 80 which is incompatible with SQL Server 2012. Several views contain unsupported non-ANSI joins which do not work with DBCL > 80.\n       Mitigation : The vendor will be providing updated views that will allow DBCL 90. This will allow us to migrate to 2012.\n\n      The updated views and instructions are in the project folder.", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 1, "ignore_flag" => 0]);
     $app->people()->attach([Person::where('name', 'Elizabeth Grigsby')->first()->id, Person::where('name', 'Jeremy Bloomstrom')->first()->id]);
     $app->applications()->attach([Application::where('name', 'Chameleon')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "BITDEV", 'description' => "BIT Development Db", "server_id" => Server::where('name', 'msbsqlrpt')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 1]);
     $app->servers()->attach([Server::where('name', 'msbsqlrpt')->first()->id]);
     $app = Database::create(["name" => "ElectionsDB_2011copy", 'description' => "ElectionsDB_2011copy", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 1]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "Elections_2006_May", 'description' => "Elections_2006_May", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 1]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "Elections_2006_Oct", 'description' => "Elections_2006_Oct", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 1]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "Elections_2007_Oct", 'description' => "Elections_2007_Oct", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 1]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "Elections_2008_Oct", 'description' => "Elections_2008_Oct", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 1]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "Elections_2009_Mar", 'description' => "Elections_2009_Mar", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 1]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "Logos_DW", 'description' => "Logos Analytics Database", "server_id" => Server::where('name', 'logos7sql')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 0]);
     $app->applications()->attach([Application::where('name', 'Logos')->first()->id]);
     $app->servers()->attach([Server::where('name', 'logos7sql')->first()->id]);
     $app = Database::create(["name" => "ProjectBoardProd", 'description' => "Project Board Production Database", "rpo" => "1 day", "rto" => "1 day", "dr_strategy" => "n/a", "ha_strategy" => "n/a", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 1, "ignore_flag" => 0]);
     $app->people()->attach([Person::where('name', 'Jeremy Bloomstrom')->first()->id]);
     $app->applications()->attach([Application::where('name', 'Project Board CMS')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "Monitor", 'description' => "Disk Space monitoring db", "server_id" => Server::where('name', 'logos7sql')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 1]);
     $app->servers()->attach([Server::where('name', 'logos7sql')->first()->id]);
     $app = Database::create(["name" => "ReportServer", 'description' => "Logos Report Server Database", "server_id" => Server::where('name', 'logos7sql')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 0]);
     $app->applications()->attach([Application::where('name', 'Logos')->first()->id]);
     $app->servers()->attach([Server::where('name', 'logos7sql')->first()->id]);
     $app = Database::create(["name" => "ReportServerTempDB", 'description' => "ReportServerTempDB", "server_id" => Server::where('name', 'logos7sql')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 1]);
     $app->servers()->attach([Server::where('name', 'logos7sql')->first()->id]);
     $app = Database::create(["name" => "LogosRuntimeServices", 'description' => "Logos Runtime Services Database", "server_id" => Server::where('name', 'logos7sql')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 0]);
     $app->applications()->attach([Application::where('name', 'Logos')->first()->id]);
     $app->servers()->attach([Server::where('name', 'logos7sql')->first()->id]);
     $app = Database::create(["name" => "Kodak_TRIM", 'description' => "Microfilm Archive Trim Database", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 1, "ignore_flag" => 0]);
     $app->people()->attach([Person::where('name', 'Davey Griffith')->first()->id, Person::where('name', 'Jeremy Bloomstrom')->first()->id]);
     $app->applications()->attach([Application::where('name', 'Trim')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "MEdat2011", 'description' => "Max Solutions Ice Rink Database", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 1, "ignore_flag" => 0]);
     $app->people()->attach([Person::where('name', 'Elizabeth Grigsby')->first()->id]);
     $app->applications()->attach([Application::where('name', 'Maximum Solutions')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "MEdat2011_Palmer", 'description' => "Max Solutions Palmer Pool Database", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 1, "ignore_flag" => 0]);
     $app->people()->attach([Person::where('name', 'Elizabeth Grigsby')->first()->id]);
     $app->applications()->attach([Application::where('name', 'Maximum Solutions')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "MEdat2011_Wasilla", 'description' => "Max Solutions Wasilla Pool Database", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 1, "ignore_flag" => 0]);
     $app->people()->attach([Person::where('name', 'Elizabeth Grigsby')->first()->id]);
     $app->applications()->attach([Application::where('name', 'Maximum Solutions')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "ReportServerTempDB", 'description' => "ReportServerTempDB", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 1]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "ReportServer", 'description' => "Reporting Services Database", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 0]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "cAsset", 'description' => "iSupport Asset Database", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 1, "ignore_flag" => 0]);
     $app->people()->attach([Person::where('name', 'Elizabeth Grigsby')->first()->id]);
     $app->applications()->attach([Application::where('name', 'iSupport')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "cSupport", 'description' => "iSupport Database", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 1, "ignore_flag" => 0]);
     $app->people()->attach([Person::where('name', 'Elizabeth Grigsby')->first()->id]);
     $app->applications()->attach([Application::where('name', 'iSupport')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "cSupport_Archive", 'description' => "iSupport Archive Database", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 0]);
     $app->applications()->attach([Application::where('name', 'iSupport')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "cSupport_Bomgar", 'description' => "iSupport Bomgar Database", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 0]);
     $app->applications()->attach([Application::where('name', 'iSupport')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "cSupport_Workflow", 'description' => "iSupport Workflow Database", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 0]);
     $app->applications()->attach([Application::where('name', 'iSupport')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "cSupportReporting", 'description' => "iSupport Reporting Database", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 1, "ignore_flag" => 0]);
     $app->applications()->attach([Application::where('name', 'iSupport')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "SolarWinds", 'description' => "SolarWinds Database", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 1, "ignore_flag" => 0]);
     $app->applications()->attach([Application::where('name', 'Solarwinds')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "TRIM_DEV", 'description' => "Trim Development Database", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 0]);
     $app->applications()->attach([Application::where('name', 'Trim')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "cSurvey", 'description' => "iSupport Survey Database", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 1, "ignore_flag" => 0]);
     $app->applications()->attach([Application::where('name', 'iSupport')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "MpulseAdmin", 'description' => "MPulse Administration Database", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 1, "ignore_flag" => 0]);
     $app->applications()->attach([Application::where('name', 'MPulse')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "MPulse_Test", 'description' => "MPulse Test Database", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 0]);
     $app->applications()->attach([Application::where('name', 'MPulse')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "MPulse_Facilities", 'description' => "MPulse Facilities Database", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 1, "ignore_flag" => 0]);
     $app->applications()->attach([Application::where('name', 'MPulse')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "MPulse_Fleet", 'description' => "MPulse Fleet Database", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 1, "ignore_flag" => 0]);
     $app->applications()->attach([Application::where('name', 'MPulse')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "MPulse_EMS", 'description' => "MPulse EMS Database", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 1, "ignore_flag" => 0]);
     $app->applications()->attach([Application::where('name', 'MPulse')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "PFD", 'description' => "PFD Garnishment Database", "upgrade_readiness" => "Vendor Approved : N/A\n      Vendor Assist : N/A\n      Upgrade Advisor :  Yes\n      Issues :\n       Warning: UD CLR Objects may function differently in DBCL110.\n       Mitigation: Keep DBCL at 100.", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 1, "ignore_flag" => 0]);
     $app->applications()->attach([Application::where('name', 'PFD Garnishment')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "PFD_Test", 'description' => "PFD Garnishment Testing Database", "upgrade_readiness" => "Vendor Approved : N/A\n      Vendor Assist : N/A\n      Upgrade Advisor :  Yes\n      Issues :\n       Warning: UD CLR Objects may function differently in DBCL110.\n       Mitigation: Keep DBCL at 100.", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 0]);
     $app->applications()->attach([Application::where('name', 'PFD Garnishment')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "ProjectBoardTest", 'description' => "Project Board CMS Development Database", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 0]);
     $app->applications()->attach([Application::where('name', 'Project Board CMS')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "OutageTracker", 'description' => "OutageTracker", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 1]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "MSB_Elections", 'description' => "Elections Database", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 1, "ignore_flag" => 0]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "MSB_Elections_Test", 'description' => "Elections Test Database", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 0]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "ePO4_MCAFEE-APP", 'description' => "McAfee AV Database", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 1, "ignore_flag" => 0]);
     $app->people()->attach([Person::where('name', 'Randy Jones')->first()->id, Person::where('name', 'Rod Hoskinson')->first()->id]);
     $app->applications()->attach([Application::where('name', 'McAfee Enterprise AV')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "cartegraph_SQL_db01", 'description' => "Cartegraph Database", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 1, "ignore_flag" => 0]);
     $app->people()->attach([Person::where('name', 'Matt Rykaczewski')->first()->id]);
     $app->applications()->attach([Application::where('name', 'Cartegraph')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "MSB_LandManagementDocBrowser", 'description' => "Land Management Document Browser Database", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 1, "ignore_flag" => 0]);
     $app->applications()->attach([Application::where('name', 'Land Management Doc Browser')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "TrimDeploy", 'description' => "Trim Deployment Database", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 0]);
     $app->applications()->attach([Application::where('name', 'Trim')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "TRIM_Upgrade", 'description' => "Trim Upgrade Database", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 0]);
     $app->applications()->attach([Application::where('name', 'Trim')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "MPulse_Facilities_restored", 'description' => "MPulse_Facilities_restored", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 1]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "MPulse_EMS_restored", 'description' => "MPulse_EMS_restored", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 1]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "MPulse_Fleet_restored", 'description' => "MPulse_Fleet_restored", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 1]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "SYMPRO_Matanuska", 'description' => "Sympro Production Database", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 1, "ignore_flag" => 0]);
     $app->applications()->attach([Application::where('name', 'Sympro')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "TRIM_reporting", 'description' => "Trim Reporting Database", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 1, "ignore_flag" => 0]);
     $app->applications()->attach([Application::where('name', 'Trim')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "ReportServer", 'description' => "Reporting Services Database", "server_id" => Server::where('name', 'msbsqlrpt')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 0]);
     $app->servers()->attach([Server::where('name', 'msbsqlrpt')->first()->id]);
     $app = Database::create(["name" => "ReportServerTempDB", 'description' => "ReportServerTempDB", "server_id" => Server::where('name', 'msbsqlrpt')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 1]);
     $app->servers()->attach([Server::where('name', 'msbsqlrpt')->first()->id]);
     $app = Database::create(["name" => "OutageTrackerDev", 'description' => "IT Dashboard Development Database", "server_id" => Server::where('name', 'msbsqlrpt')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 0]);
     $app->applications()->attach([Application::where('name', 'IT Dashboard')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msbsqlrpt')->first()->id]);
     $app = Database::create(["name" => "OutageTracker", 'description' => "IT Dashboard Production Database", "server_id" => Server::where('name', 'msbsqlrpt')->first()->id, "inactive_flag" => 0, "production_flag" => 1, "ignore_flag" => 0]);
     $app->people()->attach([Person::where('name', 'Jeremy Bloomstrom')->first()->id]);
     $app->applications()->attach([Application::where('name', 'IT Dashboard')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msbsqlrpt')->first()->id]);
     $app = Database::create(["name" => "cSupport_Image_Store", 'description' => "iSupport Image Store Database", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 1, "ignore_flag" => 0]);
     $app->applications()->attach([Application::where('name', 'iSupport')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "cSupport_Archive_Purchase", 'description' => "iSupport Archive Purchase Database", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 0]);
     $app->applications()->attach([Application::where('name', 'iSupport')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "cSupport_Archive_Change", 'description' => "iSupport Archive Change Database", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 0]);
     $app->applications()->attach([Application::where('name', 'iSupport')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "cSupport_Archive_Problem", 'description' => "iSupport Archive Problem Database", "server_id" => Server::where('name', 'msb01sql')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 0]);
     $app->applications()->attach([Application::where('name', 'iSupport')->first()->id]);
     $app->servers()->attach([Server::where('name', 'msb01sql')->first()->id]);
     $app = Database::create(["name" => "ReportServerTempDB", 'description' => "ReportServerTempDB", "server_id" => Server::where('name', 'sdesql10edit')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 1]);
     $app->servers()->attach([Server::where('name', 'sdesql10edit')->first()->id]);
     $app = Database::create(["name" => "ReportServerTempDB", 'description' => "ReportServerTempDB", "server_id" => Server::where('name', 'sdesql10')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 1]);
     $app->servers()->attach([Server::where('name', 'sdesql10')->first()->id]);
     $app = Database::create(["name" => "ReportServer", 'description' => "Report Server Db", "server_id" => Server::where('name', 'sdesql10')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 0]);
     $app->servers()->attach([Server::where('name', 'sdesql10')->first()->id]);
     $app = Database::create(["name" => "MATSU_CAMA_GIS", 'description' => "GIS Cama DB", "server_id" => Server::where('name', 'sdesql10')->first()->id, "inactive_flag" => 0, "production_flag" => 0, "ignore_flag" => 0]);
     $app->servers()->attach([Server::where('name', 'sdesql10')->first()->id]);
 }