
    	                     |    S r SSKrSSKJr  SSKJr  SSKJr  \R                   " S S\R                  5      5       r	g)7Migrate schema from a source database to Cloud Spanner.    N)base)flags)migration_backendc                   V    \ rS rSrSrS\R                  " S5      0r\S 5       r	S r
Srg)	Schema   r   EXAMPLESz|        To generate schema file from the source database:

          $ {command} --source=postgresql < ~/cart.pg_dump
      c                 D   [         R                  " 5       R                  U 5        [         R                  " 5       R                  U 5        [         R                  " 5       R                  U 5        [         R
                  " 5       R                  U 5        [         R                  " 5       R                  U 5        [         R                  " 5       R                  U 5        [         R                  " 5       R                  U 5        [         R                  " 5       R                  U 5        g)z$Register the flags for this command.N)
r   GetSpannerMigrationSourceFlagAddToParserGetSpannerMigrationPrefixFlag$GetSpannerMigrationSourceProfileFlagGetSpannerMigrationTargetFlag$GetSpannerMigrationTargetProfileFlagGetSpannerMigrationDryRunFlagGetSpannerMigrationLogLevelFlagGetSpannerMigrationProjectFlag)parsers    %lib/surface/spanner/migrate/schema.pyArgsSchema.Args%   s     
'')55f=	'')55f=	..0<<VD	'')55f=	..0<<VD	'')55f=	))+77?	((*66v>    c                 Z   [         R                  " 5       n[         R                  " SS0S9nU" SUR                  UR                  UR
                  UR                  UR                  UR                  UR                  UR                  US9
nUR                  U l        U R                  U5      $ )zRun the schema command.GCLOUD_HB_PLUGINtrue)
extra_varsschema)
commandsourceprefixsource_profiletargettarget_profiledry_run	log_levelprojectenv)r   SpannerMigrationWrapperGetEnvArgsForCommandr    r!   r"   r#   r$   r%   r&   r'   	exit_code _DefaultOperationResponseHandler)selfargscommand_executorenv_varsresponses        r   Run
Schema.Run1   s    (@@B 55&/1H{{{{**{{**..H ''DN00::r   )r+   N)__name__
__module____qualname____firstlineno____doc__textwrapdedentdetailed_helpstaticmethodr   r2   __static_attributes__ r   r   r   r      s;    ? 
// 
 - 	? 	?;r   r   )
r8   r9   googlecloudsdk.callioper   "googlecloudsdk.command_lib.spannerr   r   UniverseCompatibleBinaryBackedCommandr   r>   r   r   <module>rC      s=    >  ( 4 @ *;T%% *; *;r   