Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] NTML database access pseudocode #74

Open
jpeterson1346 opened this issue Sep 13, 2021 · 0 comments
Open

[FEAT] NTML database access pseudocode #74

jpeterson1346 opened this issue Sep 13, 2021 · 0 comments

Comments

@jpeterson1346
Copy link

Contact Details

usa9

Is your feature request related to a problem? If so, please describe.

Nope

What is your new feature idea or request?

image

I can give you credentials for my already-existing SQL server if you'd like. Just PM me or email me. Here's a gist of what it looks like:

GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[NTML](
	[ENTRY_ID] [int] NOT NULL,
	[ntml_timestamp] [timestamp] NOT NULL,
	[ntml_entry_time] [datetime2](7) NULL,
	[ntml_restriction_type] [text] NULL,
	[requesting_facility] [text] NULL,
	[providing_facility] [text] NULL,
	[airport] [text] NULL,
	[via] [text] NULL,
	[MIT_restriction] [real] NULL,
	[MINIT_restriction] [real] NULL,
	[free_text] [text] NULL,
	[start_time] [datetime2](7) NULL,
	[end_time] [datetime2](7) NULL,
	[acft_type] [text] NULL,
	[speed] [int] NULL,
	[speed_qualifier] [text] NULL,
	[altitude] [int] NULL,
	[altitude_qualifier] [text] NULL,
	[restriction_qualifier] [text] NULL,
	[restriction_causal_factor] [text] NULL,
	[restriction_specific_impact] [text] NULL,
	[exclusions] [text] NULL,
	[proposed] [bit] NULL,
	[approved] [bit] NULL,
	[rejected] [bit] NULL,
	[passback] [bit] NULL,
	[delay_type] [text] NULL,
	[delay_causal_factor] [text] NULL,
	[delay_specific_impact] [text] NULL,
	[facility_holding] [text] NULL,
	[delay_arriving] [text] NULL,
	[delay_departing] [text] NULL,
	[delay_number_of_acft] [int] NULL,
	[delay_length] [int] NULL,
	[delay_qualifier] [text] NULL,
	[delay_time] [datetime2](7) NULL,
	[delay_fix] [text] NULL,
	[config_airport] [text] NULL,
	[config_weather] [text] NULL,
	[config_arrival_runway] [text] NULL,
	[config_departure_runway] [text] NULL,
	[config_strat_aar] [int] NULL,
	[config_adr] [int] NULL,
	[config_aar_adjustment] [text] NULL,
	[config_dyn_aar] [int] NULL,
	[specialist_id] [text] NULL,
	[ntml_restriction_scope] [text] NULL,
	[ntml_remarks] [text] NULL,
	[aprvl] [text] NULL,
	[specialist_facility] [text] NULL,
	[facilityTable] [text] NULL,
	[ntml_guid] [uniqueidentifier] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [dbo].[NTML] ADD PRIMARY KEY CLUSTERED 
(
	[ENTRY_ID] ASC
)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
GO
ALTER TABLE [dbo].[NTML] ADD  CONSTRAINT [df_ntml_entry_time]  DEFAULT (getdate()) FOR [ntml_entry_time]
GO
ALTER TABLE [dbo].[NTML] ADD  CONSTRAINT [df_ntml_restriction_type]  DEFAULT ('Default') FOR [ntml_restriction_type]
GO
ALTER TABLE [dbo].[NTML] ADD  CONSTRAINT [df_requesting_facility]  DEFAULT ('ZXX') FOR [requesting_facility]
GO
ALTER TABLE [dbo].[NTML] ADD  CONSTRAINT [df_providing_facility]  DEFAULT ('ZYY') FOR [providing_facility]
GO
ALTER TABLE [dbo].[NTML] ADD  CONSTRAINT [df_airport]  DEFAULT ('XXX') FOR [airport]
GO
ALTER TABLE [dbo].[NTML] ADD  CONSTRAINT [df_via]  DEFAULT ('Default') FOR [via]
GO
ALTER TABLE [dbo].[NTML] ADD  CONSTRAINT [df_MIT_restriction]  DEFAULT ((-1)) FOR [MIT_restriction]
GO
ALTER TABLE [dbo].[NTML] ADD  CONSTRAINT [df_MINIT_restriction]  DEFAULT ((-1)) FOR [MINIT_restriction]
GO
ALTER TABLE [dbo].[NTML] ADD  CONSTRAINT [df_free_text]  DEFAULT ('[Enter text here]') FOR [free_text]
GO
ALTER TABLE [dbo].[NTML] ADD  CONSTRAINT [df_start_time]  DEFAULT ('2001-01-01 00:00:00.000') FOR [start_time]
GO
ALTER TABLE [dbo].[NTML] ADD  CONSTRAINT [df_end_time]  DEFAULT ('2001-01-01 23:59:59.999') FOR [end_time]
GO
ALTER TABLE [dbo].[NTML] ADD  CONSTRAINT [df_acft_type]  DEFAULT ('Default') FOR [acft_type]
GO
ALTER TABLE [dbo].[NTML] ADD  CONSTRAINT [df_speed]  DEFAULT ((-1)) FOR [speed]
GO
ALTER TABLE [dbo].[NTML] ADD  CONSTRAINT [df_speed_qualifier]  DEFAULT ('') FOR [speed_qualifier]
GO
ALTER TABLE [dbo].[NTML] ADD  CONSTRAINT [df_altitude]  DEFAULT ((-1)) FOR [altitude]
GO
ALTER TABLE [dbo].[NTML] ADD  CONSTRAINT [df_altitude_qualifier]  DEFAULT ('') FOR [altitude_qualifier]
GO
ALTER TABLE [dbo].[NTML] ADD  CONSTRAINT [df_restriction_qualifier]  DEFAULT ('') FOR [restriction_qualifier]
GO
ALTER TABLE [dbo].[NTML] ADD  CONSTRAINT [df_restriction_causal_factor]  DEFAULT ('VOLUME') FOR [restriction_causal_factor]
GO
ALTER TABLE [dbo].[NTML] ADD  CONSTRAINT [df_exclusions]  DEFAULT ('NONE') FOR [exclusions]
GO
ALTER TABLE [dbo].[NTML] ADD  CONSTRAINT [df_ntml_restriction_scope]  DEFAULT ('En Route') FOR [ntml_restriction_scope]
GO
ALTER TABLE [dbo].[NTML] ADD  CONSTRAINT [df_aprvl]  DEFAULT ('Unknown') FOR [aprvl]
GO
ALTER TABLE [dbo].[NTML] ADD  CONSTRAINT [df_specialist_facility]  DEFAULT ('ZXX') FOR [specialist_facility]
GO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants